On a free boundary problem in electrostatics