Spain isn't known for its efficient court system.
Letting good property sit empty when there's affordability crises because it's an "investment" and you're just waiting for the ability to charge more, say, is tragic.
I'm currently in the market for a home (SFBAY), one that could also house my aging parents in the future, so that they're not forced to move away to a LCOL location if they don't want to. Because of this, I'm looking at purchasing a duplex or a home with an in-law unit.
Due to extremely powerful tenant protection laws in the city I'm looking to buy in, I am not considering purchasing units that are tenant occupied, and am willing to pay a significant premium for a vacant unit vs an occupied one.
This isn't a comment on tenant protection laws themselves, but a note that both sides value a vacant unit over an occupied one in highly regulated markets.
I knew a realtor in the Bay Area who specialized in selling homes with existing tenants. He had a lawyer who specializes in owner move-in evictions.
He could find buyers properties at a substantial discount and then guide them though the eviction process. Buyers, if patient enough, could buy a $1M home for $800k plus $50k in legal costs/buyout funds.