Can I apply for permanent residency as a Filipino citizen, after 2 years of being in Spain under a non-lucrative visa which I applied for as a US citizen?

Thanks!