Route from spontaneous decay to complex multimode dynamics in cavity QED