The physical processes of emission lines in cosmic nebula
Just a short answer, and likely others will fill in more details.

If there is ionization of some atoms, then generally there is recombination as well - you will have both processes going on, roughly in balance with each other.  Typically when an electron recombines with an atom, it does so into some excited state.  Then as it drops from that excited state into lower states, it emits one or more photons on the way down.  This is how ionization gives you emission lines - it’s the inverse process that matters for the emission.

To have emission lines, the cloud only needs to be hotter than the background behind it.  So in your sketch, an observer at the bottom would see an emission spectrum (as you’ve drawn), but an observer to the right would see an absorption spectrum (with the same lines) - from that perspective, more light is lost relative to the (hot) background source than is re-emitted in that direction by the cloud.


This link may help with some additional explanation of these ideas.