Would attacking Europe proper be seen as an escalation that may bring someone like Germany into the war on Spain's side?
I'm pretty sure that any US action against the European continent would be considered a violation of the Monroe Doctrine by their own understanding at this point. Sure, Spain is in the Western Hemisphere, but by the interpretation that the US operated by, they would possibly be violating their own Doctrine.
Sure, they might be able to get away with attacking Spanish colonies in Africa (why they would want African colonies with OTL objectives, which means Africa is nowhere near the US's strategic aim), but the mainland would be pushing it.
It's is another argument against striking against Spain directly. It risks the US's still nascent navy, the bombardment really isn't guaranteed to do anything, and it might provoke other European nations to step in. Instead, consolidate gains, build up strength, and let Spain shout itself hoarse from Europe; the war is over, regardless of how much they complain.
Pretty sure the doctrine didn't mean much when the US chose to occupy the Philippines on the other side of the world.
The doctrine was always about protecting US interests in the America's not about the US not interfering overseas.
Our policy in regard to Europe, which was adopted at an early stage of the wars which have so long agitated that quarter of the globe, nevertheless remains the same, which is, not to interfere in the internal concerns of any of its powers; to consider the government de facto as the legitimate government for us; to cultivate friendly relations with it, and to preserve those relations by a frank, firm, and manly policy, meeting in all instances the just claims of every power, submitting to injuries from none. But in regard to those continents circumstances are eminently and conspicuously different.
To quote the Monroe Doctrine...
Which I've seen construed as the US saying they will not matter with their internal matters, implying that they will not mess with Europe proper.
The doctrine is silent about Asia in particular, but the Philippines are outside the hemisphere, so it doesn't take that into account, but the matters of a colony, not being directly integrated with the metropole, are technically not an internal concern depending on how you wrangle it.
Basically, you can weasel your way into the Philippines, but I don't see how you can weasel a way into assaulting Spain.
Colonies were possession of Europe and they were de jure the territory of spain or france or the UK wherever they were in the world.
As soon as a foreign colony was invaded and/or annexed that definitely counted as the internal matters of any European power.
My point is by the late 19th century the US did not practice what it preached with regards to the Monroe doctrine.
But there is a difference between treatment of the metropoles and treatment of the colonies, as the Philippines were not a part of Spain, but they were a possession of Spain. They were not integrated with the mainland of Spain (that is why the Philippines were rebelling as they desired to , and that's the distinction I am making. It's why there is a difference between attacking a (rebelling) colony vs attacking the Spanish homeland. It's just quite a jump to go, especially when bombarding Spain isn't necessary.
Not to go around in circles but to prove how that idea is wrong just look at France and Algeria. France absolutely considered Algeria to be as much a part of France as Marseilles. However there was a very large rebellion of the native Algerians.
Look at Britain and the Falklands for an even more recent example of a European power securing its overseas sovereignty. If American Samoa was invaded by another country you better believe the US would react as if its territorial sovereignty was violated.