The pure rotational and rotation-vibration Raman transitions in H2 dissolved in liquid argon (LAr, T=87 K) and nitrogen (LN2, T=80 K) are studied at different hydrogen concentrations. Whereas the rotational S0(J) (J=0, 1) shapes of H2-LAr can be accurately fitted by Lorentzian profiles, the wings of the same H2-LN2 lines demonstrate a distinct sub-Lorentzian behaviour. The difference between these patterns is attributed to the change of the time scale of anisotropic interactions which perturb the rotational motion of H2. They should be slower for the H2-LN2 system in which the long-range quadrupole-quadrupole interactions develop. The latter dominate in the formation of the symmetric H2-LN2 S1(J) line shapes. By contrast, the same H2-LAr lines are mainly monitored by the vibrational broadening and their shapes are distinctly asymmetric.