Machine learning the Hohenberg-Kohn map for molecular excited states