Non-residents who have a property in Spain are taxable by the Spanish Non-Resident Income Tax. Even if the property has neither been rented nor sold, there is an imputed rent to have under consideration, which becomes chargeable on December 31st.
Here is a list of last legislative changes concerning this tax:
11. Current regulation now admits that the profits obtained by a permanent establishment in Spain which are distributed to the PARENT COMPANY (*) in another EU state can benefit from an EXEMPTION (the same as if the profits had been distributed among Spanish companies belonging to the same holding/group), provided that the existence of the PARENT COMPANY was due to VALID REASONS.
(*) Parent company is the one who OWNS AT LEAST 5% of the capital of another company (directly or indirectly) or the one which OWNS SHARES WITH A TOTAL VALUE OF MORE THAN 20.000.000€.