We analytically evaluate the master integrals for the second type of planar contributions to the massive two-loop Bhabha scattering in QED using differential equations with canonical bases. We obtain results in terms of multiple polylogarithms for all the master integrals but one, for which we derive a compact result in terms of elliptic multiple polylogarithms. As a byproduct, we also provide a compact analytic result in terms of elliptic multiple polylogarithms for an integral belonging to the first family of planar Bhabha integrals, whose computation in terms of polylogarithms was addressed previously in the literature.