This paper presents a fully turbulent two-phase discrete adjoint method for metastable condensing flows targeted to turbomachinery applications. The method is based on a duality preserving algorithm and implemented in the open-source CFD tool SU2. The optimization framework is applied to the shape optimization of two canonical steam turbine cascades, commonly referred to as White cascade and Dykas cascade. The optimization were carried out by minimizing either the liquid volume fraction downstream of the cascade or the total entropy generation due viscous effects and heat transfer. In the first case, the amount of condensate turned out to be reduced by as much as 24%, but without reduction of the generated entropy, while the opposite resulted in the second case. The outcomes demonstrate the capability and computational efficiency of adjoint-based automated design for the shape optimization of turbomachinery operating with phase change flow.