The Verdict: Unlikely
Naturalisation needs legal residence in Spain, so your clock has not started. Your first step is a Spanish residence permit; the time you then need depends on your nationality of origin.
Visits, holidays and owning property do not count, and there is no investor shortcut. The residence must be legal, continuous and immediately before you apply.
Permits that start the clock include the digital nomad visa for remote workers, a work permit through a Spanish employer, and the non-lucrative visa if you live on savings or passive income. If a parent or grandparent was Spanish from birth, a 12-month job-search visa is a bridge to a work permit.
Once you hold one, the wait is two years for nationals of origin of Latin American countries, Andorra, Portugal, the Philippines and Equatorial Guinea, and ten for everyone else. Check which applies before choosing a permit.