Aix in Aix-la-Chapelle and Aix-en-Provence is, I believe, [Eks] in French, and not [E] (or [ei]) the way English speakers usually pronounce it. (Place and personal names often preserve final consonants where common words don't, e.g. Berlioz.)

There is no connexion between the spelling X in Aix, and the phoneticians' symbol [x] for the sound in Bach, which derives from the value of X (chi) in modern Greek. The ancient Greek alphabet added a letter X to its Phoenician inheritance, but it was used in two different ways: in some regions for [kh], which is what prevailed in classical Greek, and has become [x] in modern Greek; but in other regions it was used as [ks], and so borrowed into Etruscan and then Latin.

There has never been a case of any phonetic variation between [kh] and [ks], or between [x] and [ks].