Interesting point, but the Spanish-American War was only 20 years before that. Attitudes in the US toward Spain were probably much different then than they are now.
It’s a stupid concern. The reason the government is incompetent is that the government is incompetent. That’s not uniquely American, and there’s no evidence that race has played into any of this. We didn’t exactly change our tune when Italy freaked out. Does that mean we’re racist against Italians?