It is clear from calls and messages to me from people seeking advice there is much confusion regarding taxation when we live in Spain and have income or capital gains in the UK. Sometimes, these calls happen when people have received a letter from the Agencia Tributaria (Hacienda).
My wish is to clarify the situation so that there are no back taxes, fines nor interest to pay in Spain.
This framework will clarify the position and I include specifics regarding pensions. Tax can be, well taxing, so this framework is to help with understanding the overall situation, not to provide specific advice for your situation.