Egyptian temples had an associated building called the "House of Life" which served as a library and a a school for priests and scribes. Physicians would also have trained there, I believe, since all physicians were by definition priests of the goddess Sakhmet. In my WIP I have taken the idea of the House of Life and modified it for my world a bit. While all temples throughout Akhet will have a small version of the House of Life, the temple of Re where my main characters live and serve will have a huge complex dedicated to preservation and teaching of the knowledge and craft of the land. It will be somewhat like a university connected to the temple with an extensive library and priests and scribes specially dedicated to the instruction of younger priests and scribes.
What will be taught there? Everything from basic literacy to medicine and astronomy. However, there are some limits. The Egyptians were a practical people, in their own way. Their religion was the heart of their knowledge and every science and branch of learned they pursued had its foundations in their religious beliefs. They counted the hours for the purpose of knowing Re's course across the sky so that they could aid him on his journey. They believed that the source of the Nile was the underworld, Duat, and so they never explored it further in the real world. They were not interested in any knowledge that did not aid their understanding of their religion. (The Greeks were somewhat astounded by this attitude, but it reminds me a bit of Sherlock Holmes who didn't care about whether the earth orbited the sun or the sun orbited the earth since the knowledge had no practical use for him.)
In this environment my characters grow up from young childhood to adulthood. Some of them are content with it. But Kamose-asar, my main character, is of a more exploratory scientific mind. He wants to understand everything but is not allowed to pursue the knowledge he craves. This drives him to some very drastic actions from which the plot stems. They say that there is a fine line between genius and madness. Kamose is straddling it at the beginning of my story. Where will it take him? You'll have to wait until the book is finished to find out. ;)