Across the developing world, public goods exert significant impacts on the local rural economy in general and agricultural productivity and welfare outcomes in particular. Economic and social-cultural heterogeneity have, however, long been documented as detrimental to collective capacity to provide public goods. In particular, women are often under-represented in local leadership and decision-making processes, as are young adults and minority ethnic groups. While democratic principles dictate that broad civic engagement by women and other groups could improve the efficiency and effectiveness of local governance and increase public goods provision, the empirical evidence on these hypotheses is scant. This paper develops a theoretical model highlighting the complexity of constructing a "fair" schedule of individual contributions, given heterogeneity in costs and benefits that accrue to people depending, for instance, on their gender, age, ethnicity, and education. The model demonstrates that representative leadership and broad participation in community organizations can mitigate the negative impacts of heterogeneity on collective capacity to provide public goods. Nationally-representative household survey data from Malawi, combined with geospatial and administrative information, are used to test this hypothesis and estimate the relationship between collective capacity for public goods provision and community median estimates of maize yields and household consumption expenditures per capita. The analysis shows that similarities between the leadership and the general population, in terms of gender and age, and active participation by women and young adults in community groups alleviate the negative effects of heterogeneity and increase collective capacity, which in turn improves agricultural productivity and welfare.