You don't pay Spanish taxes if you don't derive any income from Spain and if you are less than 183 days per year in the country. If you are more than 183 days per year in the country, there's a Spanish tax treaty with the US, and you pay US taxes on your US income anyway.
And if all you have is $10mm on your checking account but no income, you don't pay any taxes anywhere.
And if all you have is $10mm on your checking account but no income, you don't pay any taxes anywhere.