Most likely, the US would simply let them have the Philippines, nobody in America really cared about the islands until after the SAW. Germany would demand them from Spain after the war anyway.
But nobody, and I mean nobody is gonna touch especially Cuba. America had been wanting Cuba for generations (and frankly, if the Philippines hadn't been taken, Cuba would be the 51st state). America would actually march on Europe before it let Germany (Also of note, remember the the Venezuela Crisis was not far before this, and America made the Germans back down from that) take Cuba. Most likely, America would annex Cuba and Puerto Rico anyway, probably without even seeing a single German ship, then the Germans would turn against Spain and take all the Spanish colonies, and Spain still looses.
The only way for Spain to win the SAW is to not play. Let America have Cuba and Puerto Rico, and then focus on building up the Philippines and Africa. The days of Spanish Domination had been over for almost 300 years at that point, a land invasion of America by Spain (assuming their creaking navy could hide from the USA's long enough to get there and land troops, which is nearly ASB in itself) would just mean that Spain is gonna loose it's entire army along with America taking everything Spain has, maybe even continental land, and left as a dying pariah state.
But nobody, and I mean nobody is gonna touch especially Cuba. America had been wanting Cuba for generations (and frankly, if the Philippines hadn't been taken, Cuba would be the 51st state). America would actually march on Europe before it let Germany (Also of note, remember the the Venezuela Crisis was not far before this, and America made the Germans back down from that) take Cuba. Most likely, America would annex Cuba and Puerto Rico anyway, probably without even seeing a single German ship, then the Germans would turn against Spain and take all the Spanish colonies, and Spain still looses.
The only way for Spain to win the SAW is to not play. Let America have Cuba and Puerto Rico, and then focus on building up the Philippines and Africa. The days of Spanish Domination had been over for almost 300 years at that point, a land invasion of America by Spain (assuming their creaking navy could hide from the USA's long enough to get there and land troops, which is nearly ASB in itself) would just mean that Spain is gonna loose it's entire army along with America taking everything Spain has, maybe even continental land, and left as a dying pariah state.