Using a nonlinear version of the well known Hardy–Littlewood inequalities, we derive new formulas for decreasing rearrangements of functions and sequences in the context of convex functions. We use these formulas for deducing several properties of the modular functionals defining the function and sequence spaces \(M_{\varphi ,w}\) and \(m_{\varphi ,w}\) respectively, introduced earlier in Hudzik et al. (Proc Am Math Soc 130(6): 1645–1654, 2002) for describing the Kothe dual of ordinary Orlicz–Lorentz spaces in a large variety of cases (\(\varphi \) is an Orlicz function and \(w\) a decreasing weight). We study these \(M_{\varphi ,w}\) classes in the most general setting, where they may even not be linear, and identify their Kothe duals with ordinary (Banach) Orlicz–Lorentz spaces. We introduce a new class of rearrangement invariant Banach spaces \(\mathcal M _{\varphi ,w}\) which proves to be the Kothe biduals of the \(M_{\varphi ,w}\) classes. In the case when the class \(M_{\varphi ,w}\) is a separable quasi-Banach space, \(\mathcal M _{\varphi ,w}\) is its Banach envelope.