Entanglement generation in a system of continuously excited anharmonic quantum oscillators