Im afraid you’re wrong Marios.
There is no need to be a resident to claim it.
You can be a non-resident purchasing spanish real estate through a spanish mortgage, in this case you may apply for a fiscal deduction in the Wealth&Income Tax.
Normally lawyers or gestorías who fill in the model 214 do this automatically for you. Just in case make sure by asking them and asking them to show it to you. You may deduct these spanish mortgage.
If the mortgage you applied for is, say taken on in an irish bank, and the property is in Spain you are not entitled to a deduction in the payment of Wealth tax.