Exceptions notwithstanding, publicly supported educational institutions were rare in Europe before the 19th century. The well-off hired private tutors for their offspring. Religious and charitable institutions provided elementary education for children of town folk. There were a few private schools.
No one dreamed of universal literacy; to the contrary. The general opinion that counted opposed literacy as inapposite to the station of the lower classes. Technical education was gained exclusively through apprenticeship. Secondary and higher education was reserved for the sons of the privileged, except for aspiring clergymen.
With the exception of Scotland and the Netherlands, the ancient universities of Europe had long ceased to be centers for the advancement of knowledge. These institutions were ossified with traditional teaching heavy in the classics, deemed suitable for church and state bureaucrats, and acting as an appropriate serving of liberal education for the sons of the ruling class.
Education and literacy grew in the 19th century, typically as a social by-product of industrialization. Sweden was an exception. A relatively poor country in 1800, its culture and polity begat a highly literate country antedating its onset into industrialization. This ample stock of human capital put Sweden in good stead once it did begin to industrialize, affording a rapid economic growth in the last half of the 19th century.
To a lesser degree, the peoples of other Scandinavian countries, the United States, Prussia/Germany, and Scotland were relatively well-educated prior to industrialization.
The original 13 colonies of the United States opened public schools in the 17th century. The first was in Boston in 1635. Well into the 19th century, New England was the most conscientious about public education.
Public secondary education in US cities became more common after the Civil War and was widespread by the mid-20th century. The South lagged behind, especially for blacks who lived there. Racial discrimination still pervades the US in every way, soiling the American societal fabric.