Anyone has an idea to prove the following inequality?
Let $g:\left(0,1\right)\rightarrow\mathbb{R}$ be twice differentiable and $r\in\left(0,1\right)$ such that $$ r\left(g"\left(x\right)+\dfrac{g'\left(x\right)}{x}\right)\geq\left(g'\left(x\right)\right)^{2},\forall x\in\left(0,1\right). $$ Prove that $$ \left(\intop_{0}^{1}e^{-g\left(x\right)}xdx\right)\left(\intop_{0}^{1}e^{g\left(x\right)}xdx\right)\leq\dfrac{1}{4\left(1-r\right)},\quad\quad {(\star)} $$ provided the LHS is finite.
Further comment: This inequality comes from a contest for undergraduate students in my university.
If we take the function $$ g\left(x\right)=-r\ln\left(-\ln\left(x\right)\right) $$ then we have $$ r\left(g"\left(x\right)+\dfrac{g'\left(x\right)}{x}\right)=\left(g'\left(x\right)\right)^{2},\forall x\in\left(0,1\right). $$ By using Mathematica, we can see that for this function $$ \left(\intop_{0}^{1}e^{-g\left(x\right)}xdx\right)\left(\intop_{0}^{1}e^{g\left(x\right)}xdx\right)=\dfrac{1}{4}\Gamma\left(1-r\right)\Gamma\left(1+r\right). $$ Moreover, we also can check that $$ \dfrac{1}{4}\Gamma\left(1-r\right)\Gamma\left(1+r\right)\leq\dfrac{1}{4\left(1-r\right)},\forall r\in\left(0,1\right). $$

This one is quite fun. Allow me to share some reasoning (not an answer yet!), which I believe might be helpful.
First, let's rewrite the ODE inequality in equivalent ways:
$$r\left(g''+\frac{g'}{x}\right)\geq g'^2$$
$$g''- \frac{g'^2}{r}+\frac{g'}{x} \geq 0$$
$$g''e^{-g/r}- \frac{g'^2}{r} e^{-g/r}+\frac{g'}{x} e^{-g/r} \geq 0 $$
Introducing a new function:
$$f(x)=e^{-g(x)/r}$$
We obtain an inequality:
Or (provided $f' > 0$ for $x \in (0,1)$):
$$( \ln f' )' \leq - \frac{1}{x}$$
Not sure how this might be useful yet, but we'll see.
Now we play with (*). Our inequality becomes:
$$\left( \int_0^1 f^r xdx \right) \left( \int_0^1 f^{-r} xdx \right) \leq \frac{1}{4(1-r)}$$
Changing the dummy variable in the second integral we have equivalent expression:
$$ \int_0^1 \int_0^1 f(x)^r f(y)^{-r} xy~dxdy \leq \frac{1}{4(1-r)}$$
Introducing:
$$u(x,y)=\ln f(x) - \ln f(y)$$
We have:
Expand both sides as Taylor series in $r$ (since $ r \in (0,1)$ the geometric series converges):
$$\int_0^1 \int_0^1 \left(1+ur+\frac{u^2r^2}{2}+\dots+\frac{u^nr^n}{n!}+\dots \right) xy~dxdy \leq \frac{1}{4} \left(1+r+r^2+\dots +r^n+\dots \right)$$
First terms are equal:
$$\int_0^1 \int_0^1 x y dx dy=\frac{1}{4}$$
For the other terms we are supposed to somehow use the ODE inequality to show:
Funny thing is, $r$ kind of disappeared from the problem statement (provided we can prove the inequality by term in the general case).
Update
Let's consider (1) when $n$ is odd. It is quite clear that:
$$I_{2k+1}=\int_0^1 \int_0^1 \left(\ln f(x)-\ln f(y) \right)^{2k+1} x y ~dx dy =0, \qquad k \in \mathbb{N}$$
Proof. Let's introduce a function $\ln f(x)=h(x)$:
$$I_{2k+1}=\int_0^1 \int_0^1 \left(h(x)-h(y) \right) \left(h(x)-h(y) \right)^{2k} x y ~dx dy =$$
$$=\int_0^1 \int_0^1 h(x) \left(h(x)-h(y) \right)^{2k} x y ~dx dy-\int_0^1 \int_0^1 h(y) \left(h(x)-h(y) \right)^{2k} x y ~dx dy$$
But both integrals are the same, since we can always change the dummy variable. Thus:
$$I_{2k+1}=I-I=0$$
Which means we only need to prove the even case of (1):
Which can be rewritten as:
$$\sum_{l=0}^{2k} \frac{(-1)^l}{(2k-l)!l!} \int_0^1 h(x)^{2k-l} x~dx \int_0^1 h(y)^l y ~ dy \leq \frac{1}{4}$$
Update 2
I am still leaving that part of the post intact, as it shows which way we can't go.
Now the problem could be reformulated in another way (where we include the odd terms from the right hand side):
I believe this can be written without $r$ as just:
$$\int_0^1 \int_0^1 \left(\ln f(x)-\ln f(y) \right)^{2k} x y ~dx dy < \frac{(2k)!}{2}$$