Heltalia is NOT a history lesson. It has historical references, so it's funnier if you know history, but it by no means teaches history. It's historilcally accurate in the sense that WW2 really happened, but it is not in any way an accurate representation of WW2.
This anime is essentially the answer to the question "what would history look like if countries were cute anime boys?". I think it's hilarious that anyone thought up this concept. It definitely doesn't take its self too seriously, some episodes make almost no sense. It really feels like the writers were just having a good time making it, and I think that's where most of its charm comes from. It's very cute and goofy.
I thought it might come off offensive, and I'm sure it will to some people, but since none of the actual events of these wars take place in the show, I think it's okay that it's more lighthearted. If it actually made light of the horrors of war, id have a problem, but "war" is just the countries slap fighting with each other.