The achievement of high-temperature superconductivity in compressed hydrides with extended lattices, e.g., ${\mathrm{H}}_{3}\mathrm{S}$ and ${\mathrm{LaH}}_{10}$, has become a milestone in the quest for room-temperature superconductivity. For realizing room-temperature superconductivity, lattices where hydrogen adopts multicentered bonds are deemed as indispensable, while hydrides containing ${\mathrm{H}}_{2}$ molecular units are believed to be unfavorable. Here, we report ${\mathrm{H}}_{2}$ molecular type hydrides with an exceptional near room-temperature superconductivity of 270 K in compressed ${\mathrm{NaH}}_{10}$ and a ${T}_{\mathrm{c}}$ of 152 K in ${\mathrm{NaH}}_{12}$, where H atoms solely constitute ${\mathrm{H}}_{2}$ units, and Na-H forms ionic bonds. Our first-principles calculations unveil that the high ${T}_{\mathrm{c}}$ is mainly attributed to strong electron-phonon coupling stemming from the large electron-phonon matrix element driven by medium-frequency interatomic interactions and high-frequency H-derived phonon softening caused by Fermi surface nesting, thus scattering itinerant electrons to form Cooper pairs. Of particular note, we reveal that the unique delocalized background charges cooperate with other electrons occupying the pressure-induced $sp$-hybridized antibonding bands of molecular ${\mathrm{H}}_{2}$ units, acting as itinerant electrons to mediate metallic interactions and participate in electron-phonon coupling. This observation reshapes the understanding of superconductivity dominated by molecular ${\mathrm{H}}_{2}$ units, provides insights for elucidating phonon-mediated superconductivity, and raises broad prospects of realizing room-temperature superconductivity in molecular hydrogen-based superconductors.