Evolution of the Luminosity-Metallicity-Stellar Mass Correlation in a Hierarchical Scenario