In short : the Statute of Secrecy, coupled with the deprecation of magic in favour of science in the Muggle minds, led to this situation.
Long Answer :
Before 1689 (when the International Confederation signed the Statute), Muggles and Wizards/Witches kind of lived together. Right after the promulgation of the Statute, all the magical population went in hiding (that is, for those who weren't already hidden, of course), effectively severing all ties with non-magical folks.
The Statute was promulgated because persecutions were reaching an all-time low. Before that, Muggles had mixed views on magic, depending on the image it gave. Alchemy, for example, was thought as a science, with priests practicing it (Roger Bacon, for example, was a friar and an alchemist); thus, it is quite "normal" that a great Alchemist like Nicolas Flamel went down in history, since Alchemy was considered as normal amongst Muggles.
Even before that, in the early years of Middle-Age, magic was generally seen in a "good" light; even if the authorities were not fond of wizards and witches, the common folks were more than ready to go and see their friendly neighbour Magic-(Wo)Man. It is then no surprise that wizards and witches, living in broad daylight amongst Muggles, could be famous in both worlds. The more one goes back in time, the more magic is intertwined with history and common folks (think of Merlin working with Arthur, to name only the most famous).
Not long after the promulgation of the Statute of Secrecy, something else happened in the Muggle world: the Enlightenment, followed by the Industrial Revolution. "Suddenly", science was the greatest thing ever along with philosophy, and anything related to magic was seen as a relic from an archaic society. The advances in technology made the Muggles stop believing and trusting magic, especially when magical folks were still highly distrustful of Muggles (who less than 50 years were still burning them, so it's quite justified).
When magic went back in a good light, it was too late; both societies had been separated for too long, and most magical folks were still at best cautious of Muggles, along with the Statute of Secrecy still banning any revelation of the magical world.
Concerning our days, this quote (one of the only sensible things Cornelius Oswald Fudge ever said) sums it all quite nicely:
Muggle Prime Minister: "But then, why hasn't a former Prime Minister warned
me?"
Cornelius Fudge: "My dear Prime Minister, are you ever going to
tell anybody?"
Concerning Old Mother Hubbard, she is supposed to be a hag who lived during the Middle Ages, far before the Statute. The nursery rhyme dates back to the early XIXth century, but the character is supposed to have lived far before that.