Idk I think Portugal, Andorra or maybe Italy are better options. If you want to move to Spain anyways and none will stop you then contact with a tax advisor from there first to help with the best setup for you, there is parts of Spain more convenient for tax no idea about it but friends told me...