An interaction between evolution and learning called the Baldwin effect is known as the two-step evolutionary scenario caused by the balances between benefit and cost of learning in general. However, little is still known about dynamic evolutions on these balances in complex environments. Our purpose is to give a new insight into the benefit and cost of learning by focusing on the quantitative evolution of phenotypic plasticity under the assumption of epistatic interactions. For this purpose, we have constructed an evolutionary model of quantitative traits by using an extended version of Kauffman's NK fitness landscape. Phenotypic plasticity is introduced into our model, in which whether each phenotype is plastic or not is genetically defined and plastic phenotypes can be adjusted by learning. The simulation results have clearly shown that the drastic changes in roles of learning cause the three-step evolution of the Baldwin effect (Suzuki and Arita, 2003) and also cause the evolution of the genetic robustness against mutations. We also conceptualize four different roles of learning by using a hill-climbing image of a population on a fitness landscape.