What if the Confederates won the Civil War and later acquired Cuba, but lost another war and retreated to Cuba?
1) HOW do they win the Civil War?
2) how do they take Cuba? Their navy will be weak, and likely not a match for the Spanish. Besides, the US navy is more likely to side with the Spanish here than the CSA.
3) if they did, somehow, take Cuba, it would be with the intent of keeping CSA style slavery - which, if anything, was worse than the Spanish style. The revolts and unrest that made Cuba a running sore for Spain would make it even worse for the CSA, who aren't even Spanish speaking nor Catholic.
Total non-starter, IMO.
Even if it were, somehow, possible, which I kind of doubt, the situation would depend drastically on HOW it happened, which would make the future outcome that you want to discuss even more contingent on those details.