Formation of quantized states and spin dynamics in III–V-based ferromagnetic quantum wells