Winning the war could be a stretch, but a better prepared Spanish military could have given the US some nasty surprises that could lead to Spanish keeping Cuba. In the end, the US' last experience in peer to peer warfare was thirty years earlier. Likewise, Native Americans lacked machine guns...