Let $X\subseteq \mathbb{R}$. Let $q\colon X\to \mathbb{R}$ and $f \colon X\times X\to\mathbb{R}$ be integrable functions.
My question: Is it true that \begin{align} \int_{X} \int_{X}q(x)^{2} f(x,y)\, \mathrm{d} x\, \mathrm{d} y\geq \int_{X} \int_{X} q(x)q(y) f(x,y)\, \mathrm{d} x\,\mathrm{d} y ?\quad (\star) \end{align}
Some comments. I sketch my attempt to prove it in the spoiler box below.
We can rewrite the LHS of the to-be-proven inequality as \begin{align} \int_{X} \int_{X}q(x)^{2} f(x,y)\, \mathrm{d} x\,\mathrm{d} y&\overset{(\#)}{=} \int_{X} \int_{X}q(y)^{2} f(y,x)\, \mathrm{d} y\,\mathrm{d} x \notag\\ & = \int_{X} \int_{X}\left(\frac{q(x)^{2}+q(y)^{2}}{2}\right) f(x,y)\, \mathrm{d} x\,\mathrm{d} y, \end{align} and since $q(x)^{2}+q(y)^{2}\geq 2q(x)q(y)$ for all $x,y\in X$, we are done.
For $(\#)$ to hold $f(\cdot,\cdot)$ must be symmetric. Is this a necessary condition for $(\star)$ to be true?
First, obviously you need $f(x,y) \geq 0$. Otherwise there are easy counter examples.
Next, let me give a counterexample when $f(x,y)$ is not symmetric in $x,y$.
Let $X = (0,2)$ and $f(x,y)$ be defined to be $0$ when $y\in (0,1)$ and $1$ when $y\in [1,2)$.
Let $q(x)$ be defined to be $\frac12$ when $x\in (0,1)$ and $1$ when $x\in [1,2)$.
$$ \iint_{X\times X} q(x)^2 f(x,y) ~\mathrm{d}x\mathrm{d}y = \frac14 + 1 = \frac54 $$
while
$$ \iint_{X\times X} q(x) q(y) f(x,y) ~\mathrm{d}x \mathrm{d}y = \frac12 + 1 = \frac32 $$
(Notice that
$$ \iint_{X\times X} q(y)^2 f(x,y) ~\mathrm{d}x \mathrm{d}y = 2 $$
and $2 + \frac54 \geq 3 = 2 \times \frac32$.)