Schooling didn’t fix all that. There have been major advances throughout society in every area: medicine, nutrition, sanitation, manufacturing, electricity, refrigeration, printing, computing, telecommunications… the list goes on and on and on. Some of these things contributed major improvements to the average person.
Advances in medicine and nutrition, for example, contributed to sharp declines in early childhood mortality and morbidity. Advances in reproductive health care (along with everything else) led to huge declines in birth rates. Smaller families have more resources and attention available for each child.
Other advances had less of an impact but still add up when combined. Widespread access to refrigeration improved nutrition and reduced spoilage, allowing increased consumption of meat. More meat means taller, stronger, healthier children.
On the other hand, schooling hasn’t improved all that much in 150 years. You can find lots of writing samples and old exams for schools from back then. The bigger difference is that children stay in school much longer and have less need to rapidly enter the workforce in order to support the family. This last factor is a product of many of the advances listed above.