You have to modify the Markdown syntax for that. One way would be to remove the parsing of the error:
:syn clear markdownError
But that would cause the other syntax rules to start an italic section on that _
char. Better just clear the error highlighting with:
:hi link markdownError Normal
To maintain the general error highlighting, but only define exceptions for the special $x_i$
string, define an overriding syntax group; luckily, this is easy because no existing syntax is there:
:syn match markdownIgnore "\$x_i\$"
(Adapt the regular expression to match all possible math expressions.)
This needs to be put into ~/.vim/after/syntax/markdown.vim
to be executed after the original syntax script.