It's also corroborated by the other Abrahamic texts from what I understand. Let's not just throw out historical sources because of a personal agenda. It's unscientific.
The overwhelming consensus among (secular) biblical scholars and historians alike is that the Egyptian Exodus very likely never occurred.
The Pentateuch is a work of mythology. There is strong textual evidence that it's a compilation of many different stories and sources over the course of many years. It was most likely written centuries after the events it purports to describe. It is full of wildly unrealistic claims.
People can make up stories on the witness stand, too. Testimony is still evidence, it just that it needs to be weighed in context by a jury (along with all the other evidence).
In the future, when humans just upload data directly to brains, and nobody remembers what a school is, then Harry Potter absolutely could be used as historical evidence that schools existed and that children went to them. The fantastical bit about learning to be a wizard may be discarded by other evidence (or lack thereof).
If they don't know what a school is, how would they know that Harry Potter is accurate?
Sewers are real. Turtles are real. Is Teenage Mutant Ninja Turtles real?
The other evidence for a school must be conclusive. Only from that evidence could you then say Harry Potter's schools were real. It's the other evidence that is evidence. Not harry potter.
Anything in Harry Potter not proven by something else, must be assumed to be fantasy.