Hello, I'm Keith and happy to help you with your question.
Well yes and no. You would be subject to Capital Gains Tax (CGT) unless you have been non resident for five whole tax years. When you left the UK did you complete a P85 and send it to your tax office? If you did not then you can do so now, the form is available on the net and can be filed on line. On receipt of the P85 HMRC will make you non resident for the tax year after departure and split the leaving year into two portions one resident and one non resident. Assuming that you have been out of the UK for the relevant period (see above) CGT is only payable on any gain made from an April 2015 valuation. You will still have your Annual Exempt Allowance of 11K to offset any gain and you may well be entitled to Lettings Relief instead which is worth up to 40K.
There you are, a quick canter through possible CGT implications. Out of UK over 5 years, CGT on gain from April 2015 values, not so then CGT on the full gain less reliefs. The gain is computed by taking the net selling price, receipt less selling costs and deducting the acquisition price. The latter is the original cost plus buying costs plus any improvements (eg installation of double glazing, central heating, extensions, but not routine maintenance which is offset against rentals received for Income Tax purposes). CGT is levied at 18% or 28% or a combination of the two rates depending on your income including the gain in the year of sale. It is possible that you could be entitled to Entrepreneur's Relief which limits the rate to 10% flat rate also.
Only the gain made proportional to the letting period is liable to CGT. Take the full period of ownership in months. Take the period it was let out ditto, deduct 18 as you are deemed to be resident in the last 18 months of ownership even if this is not the case and put the latter over the former to derive a proportion ratio.
This being essentially an UK tax advice site no account is taken of any possible liability to Spanish taxation. However there is a Double taxation Treaty in force between the UK and Spain the intention of which is to preclude moneys being taxed in bot jurisdictions. This is done by means of tax credits, such credits being allowable against the other country's tax liabilities.
I do hope I have helped open the door for you to the nightmare of CGT. It's not too bad, you just need a wet towel round your head an the backs of lots of envelopes to work it all out.