Insights on galaxy evolution from studies of the multiphase interstellar medium