Optimization of magnetoelectricity in piezoelectric–magnetostrictive bilayers