Designing non-Hermitian real spectra through electrostatics