We study the regularizing effect arising from the interaction between the coefficient \(a\) of the zero-order term and the datum \(f\) in the problem \(\begin{aligned} \left\{ \begin{aligned} -\mathcal {L}u + a(x) g(u)&= f(x) \quad & \text{ in } \;\; \varOmega ,\\ u&= 0 \quad & \text{ on } \;\; \partial \varOmega , \end{aligned} \right. \end{aligned}\) where \(\varOmega \subseteq \mathbb R^N\) is a bounded domain and \(\mathcal {L}\) is an X-elliptic operator introduced by Lanconelli and Kogoj (X-elliptic operators and X-control distances, pp 223–243, 2000). If \(f \in L^1(\varOmega )\) , we prove that the \(Q\) -condition introduced by Arcoya and Boccardo (J Funct Anal 268(5):1153–1166, 2015) is sufficient to ensure the existence and boundedness of solutions in the framework of X-elliptic operators as well. Finally, we prove the existence of a bounded solution for linear problems under a more general condition between f and a.