Evolving function spaces with applications to the well-posedness of Cahn-Hillard models on time-dependent surfaces