Your incredulity is due to Whig history and imagining late medieval and early modern China as being the same as Europe, but in fact they were quite different.
The Qing dynasty (or Ch'ing in Wade-Giles, but never Qing) caused a disastrous collapse in literacy rates, as a matter of intentional policy, bringing the literacy rate well below 1% by the end of the dynasty. But we were talking about 400 years ago, which was the Ming dynasty, when literacy was indeed widespread even among "country bumpkins", though still far from universal. Many authors writing in vernacular Chinese at the time included prefaces explaining that their work was directed at all of the "four classes", one of which (though not the lowest) was those rural farmers.
There was a lot of variation even within Europe; literacy in medieval rural shtetls was nominally a prerequisite for adulthood for men, for example, and universal primary education dates back to the Talmudic period. See https://old.reddit.com/r/AskHistorians/comments/d9hnt7/in_me... for more details.
About medieval Europe more generally, https://research.yorkarchaeology.co.uk/wp-content/uploads/20... and https://history.stackexchange.com/questions/68148/how-litera... look plausibly informative.
Literacy among "country bumpkins" was nearly universal 300 years ago among the New England colonists, fueled by movable-type printing and the Protestant rejection of priestly intermediaries, despite lacking the Imperial civil service examination system or the rabbinate as an incentive to study.