How long the shadow of the city? The impact of urbanisation on schooling