  Ensembles of M\"ossbauer nuclei embedded in thin-film cavities form a
promising platform for x-ray quantum optics. A key feature is that the joint
nuclei-cavity system can be considered as an artificial x-ray multi-level
scheme in the low-excitation regime. Using the cavity environment, the
structure and parameters of such level schemes can be tailored beyond those
offered by the bare nuclei. However, so far, the direct determination of a
cavity structure providing a desired quantum optical functionality has remained
an open challenge. Here, we address this challenge using an inverse design
methodology. As a first qualitative result, we show that the established
fitting approach based on scattering observables in general is not unique,
since the analysis may lead to different multi-level systems for the same
cavity if based on observables in different scattering channels. Motivated by
this, we distinguish between scattering signatures and the microscopic level
scheme as separate design objectives, with the latter being uniquely determined
by an \textit{ab initio} approach. We find that both design objectives are of
practical relevance and that they complement each other regarding potential
applications. We demonstrate the inverse design for both objectives using
example tasks, such as realising electromagnetically induced transparency. Our
results pave the way for new applications in nuclear quantum optics involving
more complex x-ray cavity designs.
