If you use unicode-math then you are using a different font and a different layout engine (the settings for Unicode Math fonts and classic Tex math fonts are quite different) However if you use latin modern for both, you can expect the glyphs to be similar and you ought to be able to make the metrics similar.
XeTeX sets the font parameters based on the OpenType math font table, but I could not see how to change the values later (you can change the fontdimen settings but they have no effect) However you can set the PDFtex ones to match xetex.
a.pdf
is pdftex and b.pdftex
is xetex generated by
pdflatex --jobname=a file
xelatex --jobname=b file
where file.tex
is
\documentclass{article}
\ifx\Umathchar\undefined
\usepackage{lmodern}
\else
\usepackage{unicode-math}
\fi
\begin{document}
\showoutput
\sbox0{$x$}
\ifx\Umathchar\undefined
\fontdimen16\textfont2=2.47pt
\else
\fi
$a_b$
\end{document}
xetex showed
....\TU/latinmodern-math.otf(1)/m/n/10 glyph#1296
....\hbox(4.86658+0.07013)x4.0202, shifted 2.47003
.....\TU/latinmodern-math.otf(1)/m/n/7.01236 glyph#1405
By default pdftex lowered the subscript more but by setting fontdimen 16 t0 2.47pt you get:
....\OML/lmm/m/it/10 a
....\hbox(4.8611+0.0)x4.01666, shifted 2.47
.....\OML/lmm/m/it/7 b
Which looks more or less the same.....
\fontdimen16\textfont2
so if you use unicode-math in xetex and lmodern package in pdftex you can force them to look similar but the xetex settings seem to be read-only the font-dimens are set by the font but changing the values later seems to have no effect