all i know from living in france, being a uk citizen, you cannot be dual taxed. you get taxed in the country of domicile if there for more than 6 months of the year. if your income is in gib and it is being paid to you in gib, offshore account, you declare, in your country of domicile, (spain), and will pay into their system, so get paid in spain from gib, or move to gib and be taxed there.
an old acquaintance living in france, but working abroad, had his monies paid into jersey, off shore, as he was away from france for more than 6 months of the year and was only liable for the property taxes on the house registered in france saving him masses in tax in france.
i don't know what the taxes are in spain, but you need to workout which tax system is best economically to you.
spain is cheap to live in and gib more expensive, but, people do work in gib and live in spain and appear to earn more net.
the only advantage i see residing in gib is that after 3 years, you qualify for gibs benefits, bus, healthcare etc, where in spain, where the country is bankrupt, you have to pay and don't seem to get the benefits that you would in gib and a nightmare in spain, especially if you don't speak the language well enough to understand your entitlements.
there are expats in gib/spain that know better than i