In Game of Thrones, scribes are sometimes called "knights of the mind", and I am told that it's because training someone to read, write, and know a lot about literature was as time-consuming and expensive as training someone to be a knight. How true is this? What did it take to turn someone fully literate, and how did this investment compare to creating a knight?
There are a couple of different kinds of literacy to look at when we look at the subject of literacy during the middle ages (caveat as usual: My focus is what's often called the High Middle Ages, from about the 11th century to the 14th.). One of them is practical literacy, and the other is what I would term scholarly literacy.
Practical literacy is what would be needed for everyday functioning as a craftsman, a tradesman, or someone managing a small estate. This would usually involve knowledge of the local vernacular language, and would normally be learned as part of either an apprenticeship-type arrangement or through the family. The wealthier in this group might have tutors to assist. This group would likely not be terribly concerned with familiarity with literature, but they might need to be able to read notes or instructions, or to deal with measurements.
Scholarly literacy was literacy in Latin (and for advanced scholars, sometimes Greek and Hebrew). By the end of this period, it is also starting to include literacy in vernacular languages, as they start to be used more often for composition (you can look at Chaucer as an example of this trend). This kind of literacy was mostly confined to the clerical world, with the exception of the nobility or wealthy gentry who might be tutored, usually by a cleric of some sort. (These learners might also learn to read vernacular languages in order to read lais or romances).
Note that while most who learned and taught Latin were "clerics", they were often in minor orders and not always directly attached to a church; many were employed in secular administration. This kind of training could prepare someone for a career as a (literal) clerk in law or administration (in England, for instance, clerks recorded land transactions and the outcome of legal cases, and managed household affairs for the wealthy.) It could prepare someone for a career in the Church, especially after the Fourth Lateran Council (1215) promoted literacy for parish priests. It could also prepare a scholar for advanced studies at universities, and for a career as an instructor and writer.
So if by "scribe", you mean an average clerk able to read and write Latin, you are likely looking at a few years of schooling attached to a local religious institution in order to learn the language and how to write it. This did not make one a scholar; that would involve attending a university for several years, not hugely unlike the university system today. It looks like most university masters attained their mastery (the default level for instructing in the universities) in their 20s.
There were also scribes who mostly just copied books. (Here's a good article on that:
https://www.medievalists.net/2014/06/copycat-life-medieval-scribe/ ) These people were not always necessarily completely Latin-literate, as there are often errors in manuscripts (although as someone who has studied actual medieval manuscripts, I can state these errors are actually fairly rare). These sorts of scribes were originally generally attached to religious institutions or monasteries, where books were copied for internal use by the religious house or institution. However, with the rise of universities starting in the 12th century, scribes began to be employed as professionals with booksellers or stationers in university towns. Some of these expanded starting in the 13th century into secular workshops focusing on luxury illuminated books for wealthy patrons (including the Church), including in languages other than Latin. This kind of professional scribal workshop eventually became part of the guild system in major cities.
Some really good sources to look at to learn more: Medieval Craftsmen: Scribes and Illuminators, by Christopher de Hamel, and Introduction to Manuscript Studies by Raymond Clemens and Timothy Graham.
(Note: This is closely related to my PhD field, which required a great deal of consultation of medieval manuscripts. I am also a working calligrapher who has copied an entire medieval manuscript to understand the process).