Public investment and education inequality