I assume that the "hidden meaning" was supposed to be a moral for the edification of the children (Think of the children! <sob>).
The idea that all stories must have a moral in order to be legitimate is modern. Conventional wisdom gets in a self-righteous huff over how the different Inquisitions censored books. It would surprise modern people to see what books those old-time moral guardians did not censor.
Daphnis and Chloë, by Longus, has a frank scene where a married woman teaches a teenaged boy how to have sex. It was first translated into a modern vernacular by a Catholic bishop and was considered a perfectly good book for teenaged girls.
The Metamorphoses of Apuleius—better known as The Golden Ass—is the oldest extant novel. It contains explicit scenes of adultery and pagan worship. St. Augustine of Hippo, the greatest of the Western Fathers of the Church, cited that novel as a partial inspiration for his own work, The City of God. None of his contemporaries faulted him for this.
I'm going by memory, so I don't have citations for some of the above claims. I have a few ideas about the origin of the modern mentality of "every story must have a moral." Those ideas center around the rise of Calvinism on the Protestant side and the rise of Jansenism on the Catholic side of Europe.
When someone says "hidden meaning," I don't think "moral." I think of symbolism; "The jacket the protagonist wore symbolizes this, them getting in the car symbolizes that, their mother symbolizes..." It's quite possible for stories to have morals without any symbolism.
That happened to me as well, and after a particularly extended dive into Robert Frost over a week, I went off to the library information system (this was pre-internet, so lots of swapping disks) and hunted down some interviews with Frost near the end of his life where he stated with some frustration his dislike of the practice of finding hidden symbols or political statements in his poetry. The Mending Wall, for example, is often used in classrooms as a symbolic reference of the Berlin wall, this was not Frost's intentions at all, but was something imagined up when he happened to have read it during a visit to Moscow during the Cold War. Proof in point, modern takes on the same poem no longer conjure up images of an impending Cold War nuclear doom.
The Golden Ass very clearly have a moral or educational purpose. It also have plenty of hidden meaning in the sense that it is an allegory. But morals have changed over time, and being a pagan work, the moral is very different than in christian or modern works.
I hope that this thread doesn't get derailed into nit-picking. The Tale of Genji was written in the eleventh century. The Golden Ass is a prose work which Apuleius wrote in the second century. Different authorities will have different definitions of the word "novel," so let's just agree to disagree.
I forget which year, but my high school had a class on science fiction. Which the teacher did not understand too well. I ended up having to publicly correct her on the interpretation of the end of 2001 (the book -- not that it matters given how closely it parallels the screen play).
To her credit, she thought about it and publicly acknowledged my correction in a subsequent class.
Also to her credit (and/or the school's): They offered a class on science fiction!
An old classmate of mine had an English professor in college who, upon questions of why there was no Science Fiction on the reading list for the year, derisively called it irrelevant trash prose or some such while making pew pew sounds.
He managed to overcome this by gifting the teacher a dog eared copy of Dune stating "it's an allegory".
The book went unread for some time, but a year later the professor looked him up to let him know that he had read Dune, found it intriguing in how many subjects it touched, from social issues to ecology to economics and called it profound. He asked for some more recommendations upon which he rapidly became a fan of Clark, Heinlein (who he had read before, but now again with new eyes) and a few others.
I was with my classmate one day years later at a grocery store and this professor saw him and walked up to say hi. A short conversation later and the professor mentioned how he had turned into quite a fan of the genre and regrets he had spent so long ignoring it. Some of the works, he said were "silly" but a few were some of the most profound descriptions of the human condition and where we're going as a species, coupled with some of the only explorations of the changes to the ethical landscape as technology transforms the world in literature...etc. etc. Before he left he said he had recently started reading some of the old Cyberpunk works and found himself sitting up at night with the realization that many of the things described in the books were coming true now, decades later.
It was really interesting to see a man, who must have been in his 70s by this point, catch the sci-fi religion like that.