Diffractive imaging of transient electronic core-shell structures in a nanoplasma