Only possible if the charger/PSU is grounded. Is it?
It could also be pickup of mains electric field by the cable. When the device is connected to a phone the whole system and its ground floats together with the electric field and no voltage is induced differentially between conductors.
A more bizarre possibility is flow of current capacitively coupled from mains into the transmitter through the ground conductor of the jack cable and a voltage drop occurring by Ohm's law. Probably too low level to be the problem, though, in any reasonable cable.
At any rate, try different cables. Is the PSU something standard like 5.5/2.1mm or USB? You could experiment with other PSUs maybe, or a power bank if USB...
For science, plug a USB cable into the phone (which doesn't hum) and touch the other end to some grounded metal. I suppose it will start humming too.