For rob33ert:
If the company is registered for the activity of renting, then it will be able to offsett the costs generated by the activity (staff, general business expenses, etc.). If the company is not registered for activity, then the only cost to be offset is the interest of the mortgage; or if the rental income is through short term rent (where the utility costs are not contracted by the tenants) those costs could then be deducted by your accountant.
For DonH:
I am not sure on how the want to make it work, but it seems that the assets are transferred into a company structure where the shareholders and company directors are other legal entities.
In any case, the direct owner will be a Spanish Ltd company, which is, at the end liable for an annual company tax, and in that return the rental income has to be reflected if received directly by the company.
For both, CGT for non residents is likely to be reduced to 18% effective next tax year.