Very much get where you're coming from ... but beware - the Land Registry system and registration of rights is a minefield, as is the legal side of searches etc. The tax you pay (stamp duty equivalent) if I remember right is far higher than in UK so you have to make that back on equity increase before you sell on to break even. Been through a load of grief in and out of Portugal and survived financially (only just !) ... but bear in mind it's not like buying a house or flat over here - far more complex in terms of potential "issues". You have to be very very careful on many fronts especially as a foreigner !
Also bear in mind there's a huge over-supply of properties at the lower end of the price spectrum so the scope for capital growth may not be nearly as much as one might think, especially when you take into account purchasing costs. That translates as you may wait a considerable time to get your initial investment back if you have a mortgage and/or your property sold if you want your money out. Not unknown to count the resale lag in years rather than months ! Also you'll pay Capital Gains Tax on any profit you make on a second home, at the higher of the local Spanish rate or the UK rate (in broad terms).
Obviously long resale lead times and price stagnation problems can hit you in the UK too. Plus all that said, you would have a holiday home to go whenever it's not let without paying hotel bills. This is great provided you want to go when it's not let out (the time when hotels are really expensive (and savings largest) is the same time you'd get the most for renting out your home / Apartment !). Just allow enough out of your income from rents to pay off agents, repairs, uncollected damages etc etc when you cost it all out to avoid ending up bailing out a loan especially if you have shoulder season 'voids' in the letting calendar.. and my own rule of thumb for buying 2nd homes abroad (not advice - just saying !) is put down at least 45-50% as a deposit. Most Continentals I know do this
Can't help thinking sometimes that buying a boat might be considerably more profitable in the end if it got chartered enough !