This paper studies the relationship between public education and pay-as-you-go social security in a representative democracy, where the government reacts both to voting and lobbying activities of workers and pensioners. While an intergenerational conflict prevails concerning actual social security contributions, workers may prefer public education for its positive effect on later pension benefits. Population aging diminishes the relative lobbying power of pensioners, leading to a higher contribution rate, educational expansion, and higher per capita income growth.