The first thing to consider is the diplomatic isolation of Spain and lack of allies were decisive factors at the time of the war of the US against Spain.
The Professionalism and preparation of the Spanish military is without any doubt and recognized in the official histories of the US, at least those I read... and that given the differences in potential and the military policies and their actual investment capabilities from their governments, the Spaniards did better able to face a strategic and tactical nightmare.
The possibility of giving independence to Cuba was not feasible first because it would have meant the fall of the government that had accepted which preferred to sacrifice the lives of their military to lose power...
Besides that even with US aid, the rebels were not near triunfar.. there were large segments of the population, loyal to Spain and they did not want to change the Spanish government by one exercised by the rebels under the oppressive American influence ... which correctly foresaw that will give them a limited sovereignty and nothing of freedom of action would allow the US. both to the Cuban people and their future governments.
The Admiral Cervera strategic mistakes, hesitations influenced, I don't doubt ... but the Spanish was a fleet that was not ready to go fight overseas as it was in the process of modernization, including its most modern ship that was missing install their artillery.
But the fleet was almost doomed once for lack of coal and the condition of the hull of one of its ships, Admiral decided Cervera go to Santiago instead of the port of Havana, which was fortified and prepared for the eventuality of having to accommodate the fleet and defend against an enemy fleet.
In this situation the only options had been landing all men, weapons and ammunition that could spare to help defend the hills of San Juan... which would have increased the chances of rejected the assaults of the American Army, increasing the chances of a Spanish victory in that battle, at least and prevent the fleet had to be forced to leave the harbor.
Also their could make a surprise or at least try, at night or at least the evening out and using torpedoes besides the naval artillery against the American ships so that at least some boats survived to reach the port of Havana.
Bob Gump I think the choose strategy was the worst possible, Cervera was an incompetent. Maybe give independence the next day to the declaration of war is a wise decision, trying to retain Puerto Rico and Philippines.
If you are interested there is an ucrony (in spanish) about the war in this page:
http://www.militar.org.ua/foro/ucron...as-t36355.html
I know and in my opinion at all fair: it is excellent but has a previous pod to war and while the war happened at the same toime and place than OTL..is a Spain better prepared and most importantly with a Navy commanded efficiently and with a different strategy to OTL, which faces the US. Navy and the collaborative TL, ending with a Spanish victory.
More specifically requested for the OP... there are a Spanish AH novella : Fuego sobre San Juan (Fire on San Juan) by Javier Sanchez and Pedro García Bilbao.
https://www.amazon.es/Fuego-Sobre-Pedro-Garc%C3%ADa-Bilbao/dp/8495820676/ref=sr_1_1?ie=UTF8&qid=1461371524&sr=8-1&keywords=Fuego+sobre+San+Juan
(The above link is from the Spanish language section, because I fails to find links in English... which I think don't exist.)
It is a short novel that was awarded and originally published in the 1998 volume of the UPC awards, it is an intense and passionate work, which mixes science fiction, alternate history, military action and time travel. Your pod is show as 'a timely warning' would be possible victory in the hills of San Juan, possibility in which I agree.
The authors achieved after this that the Spanish fleet make a fence output following the strategy of Captain Bustamante managing to do it and escape the siege. After this the authors outline us to flight the following events that occur with the inevitability of the fall of a domino chips.
The rest of the narrative moves away quickly from the probable facts and becomes more speculative until the intervention of the powers to end the war.
The novel does not end here... but the rest of the argument has more to do with what was discussed.
Accepting the novelle as a work of science fiction with a temporal agency, development derived from that Pod has little credibility or historical cohesion .... but to be the first about this war in the genre in Spanish ... and fulfills its function of disseminating the AH gender among the readers from from the best collection of Science Fiction in Spanish at this moment.