Yes, the following is a grammatical sentence:
I'm happy to hear.
Hear is both a transitive and intransitive verb:
1 : to have the capacity of perceiving sound : to be able to become aware of sound
// He doesn't hear well.
That example sentence ends with an adverb, but it certainly doesn't have to. If the same person were deaf, the sentence could as easily have been the following:
He doesn't hear.
And if a person who was deaf suddenly regained their hearing and heard something, they could say:
I'm happy to hear!
It might be uncommon to not qualify that particular sentence with again, or something else, but it's certainly grammatical nonetheless.
A more common sentence that uses a different sense of hear (2 a : to gain information : LEARN), and which ends with the word, is the following:
So I hear.
With respect to Google Books Ngram Viewer
First of all, handpicking the terms isn't the best choice in this situation. There could be variations that hadn't been thought of that, nonetheless, still exist.
When doing this kind of query, have one of the terms use a wildcard: happy to hear *. That will allow Google Books NGram Viewer to graph all of the most common phrases that it already knows about, rather than trying to second guess every variation yourself.
Second, when you search on a phrase, not only does it find that phrase itself, but all text within which the phrase appears—and, for the most part, that's without any consideration of intervening punctuation. This means that the phrase on its own could be ungrammatical, but, in context, quite grammatical.
For instance, hear two is ungrammatical as a standalone sentence. Yet, Google shows it as a somewhat common phrase.
But since it's ungrammatical, how can it be a common phrase? It's true that some books are printed with errors, and Google will catalogue and count those errors. However, that's not the case here.
Clicking on the link for hear two and bringing up the actual books with text samples, here are the first five hits (emphasis mine):
… as you hear two voices …
You will hear two words …
… you hear two frequencies …
… could distinctly hear two or three men …
… going to hear two tones …
Although I found no such instance, something like the following would also be possible:
I could hear. Two of the others could not.
In that example, hear is the last word of one sentence, and two is the first word of the next. Google doesn't discriminate, and would count it a valid source of hear two.
So even though the phrase searched for might not be grammatical, and might not be a valid standalone sentence, it could still be quite common because it's found within other text.
Barring some particularly advanced search queries, Google simply doesn't distinguish a phrase from the context in which it appears.
There is no direct correlation between every result of Google Books Ngram Viewer and the assumption that, barring additional context, something is or isn't grammatical as a phrase (or sentence) on its own.
It might be true with some results. If certain words never appear together, in any context, it's at least likely that the combined words are not grammatical.
But if words do appear together, further investigation (with dictionaries, style guides, grammar tools, and even digging down into the specific Ngram results) is warranted.