My first decision when building my company was to leave Spain.
They smash you very quickly. They do not care if they ruin you via prosecurion or you have to shut down. The tax agency is extremely agressive. The laws favor the agents to extents that are illegal and weven criminal (check the bonus of inspectors).
Check Robert Amsterdam work on this, something we all spanish know for a long time.
Spain also smashes foreigners owning a property in Spain.
They see tourists and foreigners (even if they're from the EU) as a gigantic target to squeeze and screw as hard as they can. That's what you get when your economy is based on tourism and rich foreigners owning property there: you have to squeeze those hard for it's basically all you have. Officially tourism is "only" about 15% of the GDP but Spain is a service economy and so many of those services revolve around tourism and foreigner owning properties there. Same for the construction sector: they love it when rich tourists have fancy villas built there.
My wife used to own a house there. So did her mom. They sold it all and kissed Spain goodbye once and for all: too disgusted by how the fiscal authorities were treating them.
I won't go on vacation there anymore. Both my wife and my daughter speak spanish and yet we don't plan to go there anymore: she's done giving money to Spain to be seen, in return, as a lemon out of which more juice can be squeezed.
Vote with your feet and you wallet: when a country tries to fuck you, give it the middle finger.
Where did you move to, if I can ask?