In your example, the moment you move from UK to Cayman Islands, the Spanish government/tax system will know (unless you make sure you hide it... but this is another topic). At some point you won’t be a UK taxpayer, in that moment the Spanish government/tax system will categorize you as Spanish taxpayer. I mean, if you are a Spanish citizen and you try to pull this trick, it may work as long as you never try to transfer the money you saved in the Cayman Islands to any Spanish bank account (any normal bank account, actually).
That doesn't sound right, but maybe there is something about the Spanish law I don't know. You can transition to other countries tax residency in Germany if you de-register(most countries don't have the concept of de-registering) and enter the other ones without making use of double taxation laws. You do have to notify your local tax authority of leaving though otherwise they'll happily continue treating you like a resident. Usually the overlap is something like a year. Most countries actually have insight into each others tax records nowadays.