Perhaps Spain sold the territory to another faction as a result of which it rebelled due to religious problems.
I have seen the AI buy only regions it needs to have in order to achieve the victory conditions. In this case, which faction needs Cuba to achieve victory? Not France, not England... Who else? Probably only Spain...

USA regularly appears in my games, forming from provinces owned by Britain or the 13 Colonies.
Yes. That happens when a europena faction with regions in America is destroyed in its' home theater.