Charger noise "coil whine"
When you disconnect a load from a switching power supply, there is no  or very little current. Most switching power supplies work on principle of PWM - pulse-width modulation of power pulses that are essentially "filtered" by a power inductor and output capacitor. The pulses are normally coming at high switching rate, 200 kHz, 400 kHz, up to 2+ MHz, well above the audio range. So, if there are any piezo-electric effects in the inductor, people can't hear this. 

However, this schema starts failing to work at low loads. If the load current goes low, the pulse width gets narrower and narrower, up to extinction. Some switchers transition into a linear mode when this happens, some cheap one start skipping pulses, so the effective repetition rate enters the audible frequency diapason, and all electro-mechanical and/or piezo-electrical effects start to annoy you.

When you unplug your charger from the wall, the input capacitor is still charged up, and with no load it takes about 30 second to discharge. That's why you still hear the pitch.  

If this is bothering you, you need to get a better designed charger.