You'd have to compare across a lot more fine-grained than medieval vs modern (which, in a historical sense, covers the Renaissance through to, well, now).
* It's only the last couple of hundred years that a significant body of people doing work that does not have a large physical component - bone density is heavily influenced by stressing the bones regularly through exercise.
* It's only the last hundred years that childbirth-related mortality for women has plummeted. A lot of women would die in childbirth. Early industrial revolution era saw some parts of Europe have 20-25% of women die of childbirth. Now it's an extraordinary event.
* Following from that, menopause dramatically reduces bone density for women; one reason HRT was such a popular thing in the med-to-late 20th century was that it was seen as a panacea for removing the worst effects of menopause. Unfortunately it creates a lot of issues, as well.
* Diets change dramatically. Medieval people ate (generally) much less meat and sugar, but a lot of fresh (when in season) vegetables, some fruit, and a lot of grains. Early industrial food quality plummets as people move to urban areas without the ability to grow their own food. Rickets are a huge, widespread plague on urban poor (places like Glascow had rickets endemic well into the mid 20th century) for most of the modern era.
That's just wopk and diet. Consider that the averge medieval person walked everywhere, early moderns likewise, and only from the 19th century onwards did rail, cars, and so on see people getting about without considerable exercise being involved.