Analysis of physical processes in eruptive YSOs with near-infrared spectra and multiwavelength light curves