I was asked to add a ConTeXt lmtx answer to this, I hope someone will be able to translate into LaTeX for you.
In ConTeXT lmtx it is easy to implement these changes in so-called goodie files. In this case, a bottom right kern seems to be what is needed. I added
{
tweak = "kerns",
list = {
[0x51] = { bottomright = 0.25 }, -- Upright Q
[0x1D410] = { bottomright = 0.2 }, -- Bold Q
[0x1D478] = { bottomright = 0.05 }, -- Bold italic Q
[0x211A] = { bottomright = 0.2 }, -- Blackboard bold Q
[0x1D5B0] = { bottomright = 0.05 }, -- Sans Q
},
},
into the tweaks part of ebgaramond-math.lfg
. Then the following test file
\setupbodyfont[ebgaramond-nt]
\showglyphs
\startbuffer
$Q X \mathrm{Q} X \mathbf{Q} X \mathbi{Q} X \mathss{Q} X \mathcal{Q} X \mathbb{Q} X $\par
$Q_i \mathrm{Q}_i \mathbf{Q}_i \mathbi{Q}_i \mathss{Q}_i \mathcal{Q}_i \mathbb{Q}_i $\par
\stopbuffer
\startTEXpage[offset=1dk]
Unfixed:\par
\getbuffer
\switchtobodyfont[ebgaramond]
Fixed:\par
\getbuffer
\stopTEXpage
gives the following output:

\mathbf
is a legacy command for theunicode-math
package. Replacing\mathbf{Q}_i
with\symbfit{Q}_i
takes care of one problem.