$\newcommand\R{\mathbb R}$The Riesz rearrangement inequality $$\iint_{\mathbb{R}^n\times \mathbb{R}^n} f(x) g(x-y) h(y) \, dx\,dy \\ \le \iint_{\mathbb{R}^n\times \mathbb{R}^n} f^*(x) g^*(x-y) h^*(y) \, dx\,dy\tag{1}$$ will hold for $g$ of any signs if $f,g,h$ are integrable.
Indeed, (1) will then hold, with the equality, for any constant $N>0$ in place of $g$, and then both sides of (1) will equal the same real number. Also, (1) will hold with the nonnegative function $\max(0,N+g)$ in place of $g$. So, (1) will hold with the function $g_N:=\max(-N,g)=\max(0,N+g)-N$ in place of $g$. We also have $|g_N|\le|g|$, $g_N\to g$ pointwise as $N\to\infty$, and $(g_N)^*=(g^*)_N$. So, (1) follows by dominated convergence.