It wasn’t particularly the intelligent ones who got sent to monasteries and nunneries, it was mainly younger sons of minor gentry who were not going to inherit any land (and who, for one reason or another, did not want to be professional soldiers), and daughters whose families could not afford a decent dowry for them. That is to say, it was people who were to posh to be laborers, but, through the ill luck of having an elder brother, and the lack of the talents required for any of the rather limited range of medieval professions, had few other ways to make a living.
Yes, monks (I am not sure about nuns) would get an education in basic literacy, enough so that they could copy manuscripts (an important part of a monk’s duties). However, most monks had little education beyond that, and it does not call for any particular smarts. Of course, by the law of averages, there were a few very smart monks, who educated themselves far beyond this level. They tend to be the ones that history remembers, but they were a small minority. The average IQ of monks, and the distribution of IQ levels in the monk population, probably did not differ very much from what you would have seen in the general population.
Ordinary medieval parish priests, incidentally (who were also presumably supposed to be celibate, at least in the later middle ages), were very often not literate at all.
It was a bit different with the orders of friars, that arose in the later middle ages. The orders of friars laid great stress on education, well beyond basic literacy, for their members, and very likely did attract more scholarly minded recruits than the monasteries did. The faculties of the late medieval universities were largely composed of friars. However, on the one hand, friars were only around for two or three centuries before the renaissance kicked in (when you started getting far more literate and, even scholarly, lay people around). For a long lived species like humans, that is not long at all in evolutionary terms. On the other hand, it was an important part of a friars remit to get out and about on their own and mix with (and minister to) lay people, including women! Monks were kept locked away in their monasteries, but friars most decidedly were not. This, one may suppose, would have given them much more opportunity than monks had to break the rules about celibacy, and they would doubtless have been subjected to much more temptation, too.