There is a considerable flaw in the original question, so this is more like a comment than an answer. The flaw is in saying that Merlin seems to be the same in Harry Potter as in medieval stories that modern readers variously classify as history, pseudo history, historical fiction, legends, or myths.
Thee was an episode of the Disney Channel sitcom Shake it Up (2010-2013), "Shake it Up, UP, and Away" (2 October 2011) where the protagonists CeCe and Rocky are hired to dance on the wing of an old World War One biplane - while it is flying. Told that the incredibly old man who will fly the plane was its pilot during World War One (1914-1918), CeCe asks if she should worry and Rocky grimly replies CeCe should be glad she isn't good at math - or history.
I guess J.K. Rowling has no reason to feel really bad about not being good at math - or apparently history - but maybe sometimes she might regret not being a little bit better at them.
Established around the 10th century, Hogwarts is considered to be one of the finest magical institutions in the Wizarding World, though other notable schools included Beauxbatons Academy of Magic in France, the Durmstrang Institute in Scandinavia, and Ilvermorny School of Witchcraft and Wizardry in the United States. Children with magical abilities are enrolled at birth, and acceptance is confirmed by owl post at age eleven. However, if the child in question is a Muggle-born, a staff member from the school visits with the child and his or her family in order to inform them of their magical heritage and the existence of the Wizarding world.
Hogwarts was founded around 990 A.D. by four of the greatest wizards and witches of the age: Godric Gryffindor, Helga Hufflepuff, Rowena Ravenclaw, and Salazar Slytherin. They each represented an aspect of personality that they wanted to bring out in new students. However, shortly after founding the school, Slytherin had a falling out with the other founders about blood purity, and wanted to admit only pure-blood students. He felt pure-blooded students deserved to learn magic, and those of other ancestry such as Muggle-borns and Half-bloods, were unworthy. The other three founders all disagreed, especially Gryffindor. Slytherin left the school, but not before secretly building the Chamber of Secrets. He foretold that only his own heir would be able to open it once he or she arrived at the school, and the heir would unleash a murderous basilisk living inside to purge the school of all Muggle-born students.
Merlin is listed as a notable member of Slytherin House
At some point in the tenth century, four of the greatest witches and wizards that ever lived founded Hogwarts School of Witchcraft and Wizardry. Their names were Godric Gryffindor, Rowena Ravenclaw, Helga Hufflepuff and Salazar Slytherin.
Merlin himself was sorted into Slytherin when he was at Hogwarts, and the young wizard went on to become one of the most famous wizards in history. The Order of Merlin, named to commemorate him, has been awarded since the fifteenth century. Legend has it that the First Order of Merlin’s green ribbon reflects his Hogwarts house.
If what those two sources say about Merlin is based on canon, Merlin would have attended Hogwarts sometime between when it was founded in the 10th century (901-1000) and when the order of Merlin was first awarded in the 15th century (1401-1500).
So the period of European History when Merlin might have attended Hogwarts would have been sometime during the Early Middle Ages (roughly 500-1000), or the High Middle Ages (roughly 1000--1250), or the Late Middle Ages (roughly 1250-1500).
So therefore one would suppose that either Merlin was only about eleven years old sometime during the 10th to 15th centuries, or else for some reason an adult Merlin used advanced magic to disguise himself as a little boy to attend Hogwarts and be taught elementary magic, or else Hogwarts also taught post graduate advanced magic courses for adult wizards in those days.
Anyway, if those statements about when Hogwarts was founded and that Merlin studied there in Slytherin House are based on canonical sources, they give absolutely no evidence indicating that the Merlin in Harry Potter would have been born before AD 900, and absolutely no proof that he was born before 1400.
And therefore anyone familiar with what was written about King Arthur and Merlin during the Early, High and Late Middle Ages in works that modern readers variously classify as history, pseudo history, historical fiction, legends, or myths, doesn't need to read any further, for I will have already proved my point.
The famous wizard Merlin known to witches and wizards in Harry Potter was a different person from the famous "wizard" Merlin known to us. The Merlin we know was already the subject of oral and written tales that might be classified as history, pseudo history, historical fiction, legends, or myths, when the Harry Potter Merlin would have lived during the Late, High, or even Early Middle Ages. The Harry Potter Merlin could have heard or read stories about the earlier Merlin when he was a child.
Thus it would be chronologically possible for the Harry Potter Merlin to have been named after our Merlin, the possibly more or less real Merlin, and possibly some of his fame in Harry Potter's lifetime could be due to mixing up the two (or possibly more?) Merlins.
See my answer to this question: Once Upon a Time - Merlin Timeline inconsistency?5