“What do children of five to eleven know about the sun?”
This is how ordinary people speak and understand — and educated people speak and write. No need for “age”, no need for “years”, because there is no ambiguity.
So as not to be accused of posting unsupported opinions on style — this is not a question of grammar, but usage of the language — here are some contemporary quotations to support the acceptability of this usage.
“…doors that even a child of nine knows…”
Mark Lawrence (Novelist)
“Even a child of ten would know…”
Claude Littner (Businessman)
“Even a child of twelve can do it…”
Dawn Johnson (BA Hons Graphic Design)
I have suggested how best to rewrite the quotation using an age range, but, as I mention in my reply to a comment, I would try not to write such a sentence to begin with. I have not been able to trace the source of the quotation, but assume it is meant in a literary sense, in which case I would try to avoid specifying an age range at all. That, in my opinion, is the problem. So what I would write in a British context would be something like:
“What do primary school children know about the sun?”
or, more generally:
“What do small children know about the sun?”
You can paint yourself into a corner, insisting on a particular type of expression. Often the solution is to avoid the problem completely by expressing your ideas in a different way.