Having said "es ha'Am", why does the Torah mention the men, the women and the children individually?
Rashi and Targum Yonasan: Because, whereas the men gather to learn, the women come to listen 1 and the children 2 merely to give reward to their parents for bringing them. 3
Ramban: The men and the women came in order to hear and learn, and the children too, will listen and learn, by asking the grown-ups to explain it to them. 4
See Sifsei Chachamim.
Oznayim la'Torah (citing Rashi in Korach Bamidbar, 16:27): With reference to feeding-babies
See Torah Temimah, note 14.
Ramban: Because "Taf" refers to 'young children', not babies. See Oznayim la'Torah, who explains that it can pertain to babies too - like Rashi, and he cites the Yerushalmi at the end of the first Perek of Yevamos, which relates how R. Yehoshua's mother would bring his cot into the Beis-ha'Midrash in ordet to listen to the Talmidei-Chachamim learning Torah.
Why do the Geirim also come?
Targum Yonasan: To witness Kavod ha'Torah - because the Pasuk is referring to a Ger Toshav. 1
Na'ar Yehonasan: Perhaps when he sees Kavod ha'Torah, he will convert. (The Ibn Ezra also learns like this
What are the connotations of "Lema'an Yishme'u" and "Lema'an Yilm'du Veyar'u es Hashem"?
Rashi and Ramban (Refer to 31:12:1:1 & 2). "Lema'an Yishme'u" pertains to the women, and "Lema'an Yilm'du", to the men.
Seforno: "Lema'an Yishme'u" pertains to the wise men, who will understand, and "Lema'an Yilm'du", to those who do not understand, who will learn from them.
Chagigah, 3a: The Torah writes "Lema'an Yishme'u" to preclude someone who cannot hear from the Mitzvah of Re'iyah, and "Lema'an Yilm'du", to preclude someone who cannot speak. 1
Oznayim la'Torah: The Torah writes "Lema'an Yilm'du Veyar'u ... ", to teach us that it is impossible to attain Yir'as Shamayim without learning Torah - as the Mishnah states in Avos, 2:5 'Ein Bur Y'rei Chet'.
See Torah Temimah, note 16.
Bearing in mind that everyone came to Hakhel, what did the people who were too far away from the king to hear him do?
Oznayim la'Torah : For them, the "Lema'an Yishm'u" means (not that they should hear, but) that they should understand - from the fact that Hashem has appointed the king as His Shali'ach to read out the Torah to the people and from the awesomeness of the event, they should realize that the Torah is the mainstay of Yisrael's existence and this will lead them to fear Hashem. 1
In an era and in a location of miracles, it is safe to assume that whoever came to hear was able to do so.
See Oznayim la'Torah, who, citing the Rambam and the Lechem Mishneh, elaborates.