Salam,
I have been thinking this for a quite long time. I have heard that Ummi does not mean "illiterate" but "one who has no knowledge of the Book (Gentile)." On top of that, I have come across Verses like 3:20 and 62:2. Quran 3:20 says:
"So if they argue with you ˹O Prophet˺, say, 'I have submitted myself to Allah, and so have my followers.' And ask those who were given the Scripture and the illiterate ˹people˺ 'Have you submitted yourselves ˹to Allah˺?' If they submit, they will be ˹rightly˺ guided. But if they turn away, then your duty is only to deliver ˹the message˺. And Allah is All-Seeing of ˹His˺ servants."
This verse mentioned the People of the Book and "the illiterate" people. Does this mean that all the pagans of Arabia were illiterate? And if all of them were not, this Verse makes it sound like the Prophet will only guide the People of the Book and the illiterates (only) from among the pagans of Arabia (the literate of the pagans of Arabia will be left out from guidance).
Also, Gentiles are the opposite of the People of the Book so the Quran most likely wants Ummi to mean Gentile. Furthermore, Quran 62:2 says:
"He is the One Who raised for the illiterate ˹people˺ a messenger from among themselves—reciting to them His revelations, purifying them, and teaching them the Book and wisdom, for indeed they had previously been clearly astray—"
Again, Prophet Muhammad was raised with people that are literally illiterate? This Verse again makes it sound like all pagans of Arabia were illiterate. The "illiterate" part is rather metaphorical I think. It does not really mean the pagans of Arabia were illiterate. This means that they were illiterate in the sense that they had no Divine Revelation, which basically would mean a Gentile.
Also, this raises another question. Does that mean the Prophet was also not illiterate? This means that the Prophet was just a Gentile before Revelation? Also the first Verse of Surah Alaq tells everyone to read. If the Prophet was preaching Surah Alaq and being illiterate at the same time, would not that be hypocritical? Probably the Prophet was illiterate then became literate because of the Revelation or the Prophet was always literate?