There are a lot of good thoughts being bandied about, but the root of the matter is this:
The Basque region and people are uniquely ancient and cannot be considered interchangable with the Spanish.
The name Xabier is Basque in origin, having derived from a place called Etxabier or Etxaberri. In Basque, Xabier is pronounced [SHAH-bee-AYR].
It spread east into France and west into central Spain. There were many spelling variations, but both were primarily written Xavier.
In Spain, it was pronounced [HAH-vee-AYR]. This led to the alternate spelling with the same pronunciation, Javier, and it is also found in Portugal. Note as well, that some still use the 'b' instead of the 'v' as is common in Spanish
In France, it was pronounced [ZAH-vee-AY] and this naturally led to the earlier English pronunciation [ZAYV-yer]. A more emphatic pronunciation developed later, and that is the [ek-ZAYV-yer] or [eg-ZAYV-yer] form.
As with many saints, the Latin form Xaverius, came later, likely when submitted for canonization.