The name "baba ghanouj" is Arabic, and is written differently depending on how you convert the Arabic script into English. Sometimes it is written with an "sh" instead of a "j".
The final consonant in "baba ghanouj" is ج ; in Arabic, this is usually pronounced [dʒ] (as in the English "j" sound) or [ʒ] (like "Jacques"). (In Egypt, this even gets a [g] pronunciation.) So, the "j" spelling of "baba ghanouj" reflects a certain standard transliteration of Arabic spelling. For some reason, the [dʒ] or [ʒ] was devoiced (a.k.a. neutralized) into [ʃ]. However, this is not normal in the common Arabic dialects that I am familiar with, so I seriously doubt that Arabic has anything to do with the cause.
In any case, final consonant devoicing occurs in a number of languages as a broad and general process, and occurs in many more languages in one-off instances from time to time. So, either the word originally came into English via another language that neutralized the final consonant, or we neutralized the final consonant ourselves. The most likely candidate to take an Arabic word, neutralize the final consonant and then pass it on to English? Turkish. (This is my educated guess.)
Short version: for some reason, the sound became devoiced, but the spelling with a "j" reflects Arabic spelling.