  We present the stellar mass-[Fe/H] and mass-[Mg/H] relation of quiescent
galaxies in two galaxy clusters at $z\sim0.39$ and $z\sim0.54$. We derive the
age, [Fe/H], and [Mg/Fe] for each individual galaxy using a full-spectrum
fitting technique. By comparing with the relations for $z\sim0$ SDSS galaxies,
we confirm our previous finding that the mass-[Fe/H] relation evolves with
redshift. The mass-[Fe/H] relation at higher redshift has lower normalization
and possibly steeper slope. However, based on our sample, the mass-[Mg/H]
relation does not evolve over the observed redshift range. We use a simple
analytic chemical evolution model to constrain average outflow that these
galaxies experience over their lifetime, via the calculation of mass-loading
factor. We find that the average mass-loading factor $\eta$ is a power-law
function of galaxy stellar mass, $\eta \propto M_*^{-0.21\pm0.09}$. The
measured mass-loading factors are consistent with the results of other
observational methods for outflow measurements and with the predictions where
outflow is caused by star formation feedback in turbulent disks.
