I've only given this topic a quick read, but I'd like to make one point clear. Applying for residency doesn't automatically make you fiscally resident for the year of application. If you move here in the second half of the year, then you might as well get the residency application done. You will only be fiscally resident for the subsequent year.
What you need to be careful about is after you've submitted your first resident tax return here, when you then opt out of the HMRC system. A friend of mine made a mistake with his application to HMRC, and they refunded tax paid in the UK even though he'd already declared that tax in his Spanish return and offset that UK tax against the amount due here. Agencia Tributaria subsequently demanded he pay the tax and imposed a fine.