  We consider the two-photon exchange contribution to the $2P-2S$ Lamb shift in
muonic deuterium in the framework of forward dispersion relations. The
dispersion integrals are evaluated using experimental data on elastic deuteron
form factors and inelastic electron-deuteron scattering, both in the
quasielastic and hadronic range. The subtraction constant that is required to
ensure convergence of the dispersion relation for the forward Compton amplitude
$T_1(\nu,Q^2)$ is related to the deuteron magnetic polarizability $\beta(Q^2)$.
Based on phenomenological information, we obtain for the Lamb shift $\Delta
E_{2P-2S}=2.01\pm0.74$ meV. The main source of the uncertainty of the
dispersion analysis is due to lack of quasielastic data at low energies and
forward angles. We show that a targeted measurement of the deuteron
electrodesintegration in the kinematics of upcoming experiments A1 and MESA at
Mainz can help quenching this uncertainty significantly.
