Yes, through the Digital Nomad Visa, provided you earn at least approximately €2,850 per month from an employer or clients based outside Spain, and no more than 20% of your income comes from Spanish sources.