Say you don’t live in Spain but you have property here for your personal use. In addition to all the other taxes, you are also expected to file a non-resident tax return and pay taxes on the “imputed” income from the property.
There’s a pretty simple solution to this, and that is to make sure you have other passive foreign income from a foreign country that doesn’t tax non-residents on your investments (eg Switzerland for interest or capital gains), or at least has a tax rate lower than your home country. (In some cases, this may be Spain, since Spain has a pretty low taxation of passive income).
Then when you do your declaration, you just credit the tax you paid on your imputed rental income against the tax you owe on your other foreign income, and voila, no net tax increase.
Some countries only let you credit foreign taxes against income from that country, so it may not work in all cases.