Moduli spaces for linear differential equations and the Painlevé equations