I had a very similar experience in middle school and high school in rural Florida, almost point-by-point. Yet I thought I had rather decent education.

So what if my 11th grade American History teacher gave a week-long seminar on the Civil War as "states rights", and explained to the class (nearly 1/3 of which was black) the lexicon of racial classifications--"now a _blue_ black was somebody who was really dark and because of the sun reflected on their skin...". I still learned 99% of the same American History as everybody else. Most of us were rolling our eyes in class, anyhow, and while these types of teachers are not uncommon, they're not exactly common, either. It's more like that they're tolerated because it's understood that they represent a persistent aspect of the local culture that isn't going anywhere. And for the most part for any particular subject you're learning from multiple different teachers at different times, so it's not like you don't learn the legitimate subject material. It's more like you're taught what today we call "alternative facts", and in practice they're really only taken in by the same segment of the population that's creating those facts. If a kid grows up steeped in this culture at home, the presence or absence of it at school is almost irrelevant. The important point is that they're at least exposed to the real facts--which they are, perhaps with the exception of sex education.

Combined with the fact that most people aren't particularly intellectually curious and don't retain much of the detail, it's sufficient that they're taught the proper material in broad strokes. And they are.

Plus, after having traveled the world some as an adult, most places around the world--even in places Americans look up to as more "civilized"--have similar issues where local biases and mythologies are taught as fact when they're glaringly, painfully wrong-headed to more objective observers. While most of the kids in my class were rolling their eyes, there are kids in similar classes in Asia, Africa, Latin America, the Middle East, and even Europe eagerly taking notes on some ridiculous and patently prejudiced narrative.

The weird thing about being American is that we've been having an intense, rancorous, open argument about ourselves and our prejudices for at least 50, if not 100, or even 200 years. Everybody else gets to watch it, too. You'd think Americans are the most racist, bigoted, backward people on the face of the earth. In reality, it's just that we were one of the first--and still one of the few--to recognize our bigotry and prejudices systematically. Not just by an intellectual, bourgeois elite. Even the most bigoted American won't take at face value a narrative that group A is intellectually, genetically, or morally inferior from group B. Every coal rolling white nationalist (not that these things always come together) have shockingly modern and sophisticated ideas about race and culture, even if cringe worthy. In most parts of the world people will treat claims that group A is worse than group B no more worthy of suspicion than claims that the sun rises in the East and sets in the West. Except for Americans--everybody knows how racist Americans are. Racism is an American problem. It's why they're talking about it so much.

To be clear, we are racist and we are biased. I don't want to say that we're any more or less these things than somewhere else; I'm not sure what value there is in that comparison.[1] But there's a level of self-reflection here that is absent or at least lesser in most of the rest of the world.

[1] I mean, we had slavery here. That's crucial. But so did most of the Americas. Slavery was at least as formative to Brazil as it was to the U.S., and any curious traveler to Venezuela, Columbia, and even Ecuador can see shadows of the same anti-black prejudices and ostracism we're familiar with in the U.S., entirely home grown and stemming from their native histories of slavery. It's just these shadows are often simply considered as the way things are supposed to be, though I think Brazil is more like the U.S. than other countries in how they've internalized a more sophisticated ability to reflect on these things.