Start with the Hilbert space $L^2([0, 1])$ with Lebesgue measure. Fix some Borel-to-Borel measurable function $f: [0, 1] \times [0, 1] \rightarrow \mathbb{R}$. I present 4 scenarios, each more restrictive (and hence more likely to give a positive answer) than the previous one.
$f(\cdot, y)$ belongs to $L^2([0, 1])$ for all $y \in [0, 1]$.
$f$ is bounded.
$f$ is continuous.
$f$ is continuous and for all non-zero $g \in L^2([0, 1])$ the integral $\int f(x, y) g(x) dx$ attains value $0$ only finitely many times.
In each of these scenarios I ask the following question: does there necessarily exist a non-zero element $g \in L^2([0, 1])$ such that $\int f(x, y) g(x) dx \ge 0$ for all $y \in [0, 1]$?