I've noticed this trend where people, when referring to historical figures from the geographical region that is Germany, will call them Germans, even if they ruled far before unification.
Things like referring to Frederick Barbarossa, Frederick the Great, or various Austrian monarchs as statespeople of Germany, or referring to the Hussars employed by Great Britain during the American Revolution as German.
It was always my understanding that there was no such thing as a "Germany," before Otto von Bismarck unified the lot of it. Is this a flaw in my understanding, or are such people using misleading terminology?
It's anachronistic and scholars use it anyway.
"Germany" in medieval is sometimes a proxy for "German-speaking territories"; sometimes for the rough boundaries of modern-day Germany; and sometimes for the Holy Roman Empire. But take that last with caution, because generally the Low Countries are studied as a unit regardless of Dutch (deutsch)/French/Flemish language. A lot of scholars will specify what they mean--whether it's in terms of political control, common language, geography, cultural influence, etc.
To some extent this trend is an artifact of the nationalism that colored European history well into the 20th century. It's not just Germany, either, although it's more noticeable there because of the name. "France" in the Middle Ages, as denoted by the area controlled by the French king, is quite small until very late. You don't even have a linguistic unifier there, either.
And that's to say nothing about "medieval Spain" and "medieval Italy"...
Much like "Middle Ages," "early modern," and "modern," Germany and France are terms of modern convenience for a lot of the time period they're used in reference to.
Generally speaking, it is acceptable to use German/Germany before 1871. Historians often use terms that were never in use in real life like Byzantine Empire of Polish-Lithuanian Commonwealth. But German was used long before Bismarck's declaration in Versailles Hall of Mirrors. There was a long-standing common cultural German sphere that stretched back to the start of the Early Modern period or before, in which even if individuals saw themselves as Catholic Bavarians or Lutheran Brandenburgers, they tapped into a collective circle of letters, cultural mores, and shared historical memory. Identity can be quite malleable, and these overlapping forms of identification (confessional, regional, linguistic, national, etc.) were not a contradiction. The long list of royal appendages for the Holy Roman Emperors after the Reformation revived the medieval title rex teutonicorum with King of the Germans is a testament to these overlapping forms of identification; the Emperors could simultaneously consider themselves a Burgundian Duke and a German King.
Just referring though to everyone in this region as German though can get a bit messy, especially since this region of Europe could be quite polyglot and heterogeneous. Haphazard use of German could impart a certain cultural and ethnic homogeneity that did not exist on the ground. One way around this use Central Europe/Central European in place of German as a means around this uncertainty. But as with all conventions, consistency is key.