You know that your phone calls inside the USA can be bugged and lisened to by Law Enforcement (hopefully with a warrant).
Quickly: what's the actual name of the program used to do that?
If you answered "no idea", now you know why Harry didn't know the name of the spell. It was more than enough for him to know the charm existed and its effects on him.
If you answered "Echelon", I hereby award you a Conspiracy Theorist badge. Echelon could not be used for domestic surveillance. You're STILL no better off than Harry.
If you answered with a real program name, you are hereby declared to be Hermione :)
Why didn't Harry hear that the detection of underage magic was called "The Trace" until he was almost seventeen and slated to go into his seventh year at Hogwarts?
Mostly, because he was not Hermione. He had a practical appreciation of magic.
It was enough for him to know that yes, he can be traced. The name of the charm does him no good so why bother researching?
Surely Ron and Hermione knew of this term, and it would seem Harry might have heard other students talking about the Trace at Hogwarts.
This was mostly an internal Ministry charm. People would talk about the effects of it, but it's not at all clear that non-DMLE wizards would easily know what it's called.
Ron (IIRC) told Harry about the underage magic restriction. Dumbledore definitely did. Neither ever used the term "Trace".
Moody was impatient but it doesn't necessarily imply he was annoyed at Harry not knowing a common fact as opposed to simply wanting to not be interrupted and get a move on.
Especially since Harry was formally disciplined for under-age magic twice (Aunt Marge in PoA and the Patronus Charm in OotP), he ought to have known about the Trace long before year seven.
But he did know. He just didn't know (or need or care to know) what the charm was called.
 OK, technically there were rumors that Echelon may have been used to minotor domestic calls in terrorism related investigations in 2000s. I don't know if it was true, but this is a minor specific case not applicable to most phone taps by domestic law enforcement
 DMLE=Department of Magical Law Enforcement