  Recently, a Verwey-type transition in the mixed-valence alkali sesquioxide
Cs$_4$O$_6$ was deduced from the charge ordering of molecular peroxide
O$_2^{2-}$ and superoxide O$_2^-$ anions accompanied by the structural
transformation and a dramatic change in electronic conductivity [Adler et al,
Sci. Adv 4, eaap7581 (2018)]. Here, we report that in the sister compound
Rb$_4$O$_6$ a similar Verwey-type charge ordering transition is strongly linked
to O$_2^-$ orbital and spin dynamics. On cooling, a powder neutron diffraction
experiment reveals a charge ordering and a cubic-to-tetragonal transition at
$T_{\rm CO}=290$ K, which is followed by a further structural instability at
$T_{\rm s}=92$ K that involves an additional reorientation of magnetic O$_2^-$
anions. Magnetic resonance techniques supported by density functional theory
computations suggest the emergence of a peculiar type of $\pi^*$-orbital
ordering of the magnetically active O$_2^-$ units, which promotes the formation
of a quantum spin state composed of weakly coupled spin dimers. These results
reveal that similarly as in 3$d$ transition metal compounds, also in in the
$\pi^*$ open-shell alkali sesquioxides the interplay between Jahn-Teller-like
electron-lattice coupling and Kugel-Khomskii-type superexchange determines the
nature of orbital ordering and the magnetic ground state.
