This indicates insufficient nutrition for most of the population. Famines were common approx. 5-7 years, so if you were one of the small folk, you experienced two to three of them as a juvenile.
And bad nutrition has some effect on brain, too, after all it is part of the body. I do not want to claim that medieval people would be unable to learn calculus, but those with worst food security might struggle.
The flynn effect has slowed down in the western world. This highly suggests not genetic changes but genetic potential being fulfilled thanks to environmental improvements.
And yes, medieval people were as intelligent as modern people. Many of the smartest minds of humanity haven't lived today but hundreds or thousands of years ago. I'd put all behaviorally modern humans are into the same category.