(The following is inspired by Integral inequality with a function twice differentiable: Integrating by parts transforms the integral with $f$ to an integral with $f'$. The condition $\int_0^1 f(x) \, dx = 0$ is used to add a term to the first integral so that the $u(b)v(b)-u(a)v(a)$ term vanishes. Cauchy-Schwarz then helps to estimate the integral containing $f'$ by an integral containing $f'^2$.)
Integrating by parts we get
$$
\int_0^1 xf(x) \, dx = \frac 12 \int_0^1 (2x-1)f(x) \, dx = \frac 12 \int_0^1 x(1-x) f'(x) \,dx \\
= \frac 12 \int_0^1 \frac{x \sqrt{1-x}}{\sqrt{1+x}} \sqrt{1-x^2} f'(x) \, dx \, .
$$
Now apply Cauchy-Schwarz:
$$
\left( \int_0^1 xf(x) \, dx \right)^2 \le \frac 14 \int_0^1 \frac{x^2(1-x)}{1+x} \, dx \int_0^1 (1-x^2) (f'(x))^2 \, dx \\
\le \frac 14 \int_0^1 x^2(1-x) \, dx \int_0^1 (1-x^2) (f'(x))^2 \, dx \\
= \frac{1}{48 }\int_0^1 (1-x^2) (f'(x))^2 \, dx
$$
which is better than the desired estimate by a factor of $2$.
Using the exact value $\int_0^1 \frac{x^2(1-x)}{1+x}\, dx = 2 \ln(2) - 4/3$ we get the sharp estimate
$$
\int_0^1 (1-x^2) (f'(x))^2 \, dx \ge C \left( \int_0^1 xf(x) \, dx \right)^2
$$
with
$$
C = \frac{2}{\ln(2)-2/3} \approx 75.53 \, .
$$
Equality holds if equality holds in the Cauchy-Schwarz inequality, and that is if
$$
f'(x) = \text{const} \cdot \frac{x}{x+1}
$$
so that the integrands are linearly dependent. Together with the condition $\int_0^1 f(x) \, dx = 0$ this gives (up to a multiplicative constant)
$$
f(x) = x - \ln(x) + 2 \ln(2) - \frac 23 \, .
$$
Let $f^+(x)=\max\{0,f(x)\},f^-(x)=\max\{0,-f(x)\},$ and assume $$A^+=\{x|f^+(x)>0\},A^-=\{x|f^-(x)>0\},$$then $A^+\cap A^- = \emptyset$
$$\int_{A^+}f^+(x)=\int_{A^-}f^-(x)=a$$for some $a\ge 0$ by $\int_{0}^{1}f(x)=0.$
We have that $$a \le m(A^+),$$and,$$a\le m(A^-).$$
We now want to find the maximum of $$\int_{0}^{1}f^3(x)=\int_{A^+}f^+(x)^3-\int_{A^-}f^-(x)^3$$
So we just need to find the maximum of $\int_{A^+}f^+(x)^3$, and the minimum of $\int_{A^-}f^-(x)^3$.
For the first term, we have $f^+(x)\le 1$,So $$f^+(x)^3\le f^+(x)$$
hence we have $$\int_{A^+}f^+(x)^3\le \int_{A^+}f^+(x) = a.$$
and for the second term we have $$\frac{\int_{A^-}f^-(x)^3}{m(A^-)}\ge \left(\frac{\int_{A^-}f^-(x)}{m(A^-)}\right)^3=\left(\frac{a}{m(A^-)}\right)^3$$(You can prove it by Hölder's inequality)
So we have $$
\int_{0}^{1}f^3(x)=\int_{A^+}f^+(x)^3-\int_{A^-}f^-(x)^3\le a-\frac{a^3}{m(A^-)^2}\le a-\frac{a^3}{(1-m(A^+))^2}\le a-\frac{a^3}{(1-a)^2}
$$
Since $2a=\int_{A^-}f^-+\int_{A^+}f^+\le 1$, so $a\le 1/2.$ So by a simple computation $$a-\frac{a^3}{(1-a)^2}\le \frac{1}{4}\quad a\in[0,1/2].$$ When $a=\frac{1}{3}$, it equals to $\frac{1}{4}.$
To show $\int_{0}^{1}f(x)^3$ can attain $\frac{1}{4},$ consider such $f(x)$:$$f(x)=1,0\le x\le \frac{1}{3},f(x)=-\frac{1}{2},\frac{1}{3}<x\le 1. $$
Best Answer
I don't know if you are aware of the Euler-Lagrange Identity, but that would solve this in one line. So for any integral of the form
$$J[f] = \int_{x_1}^{x_2} L(x,f(x), f'(x))dx$$
The minima or maxima will occur when $f$ satisfies the following differential equation
$$\frac{\partial L}{\partial f} - \frac{d}{dx}\frac{\partial L}{\partial f'} = 0$$
The derivation is quite well explained here, and should be easy enough to follow: https://en.wikipedia.org/wiki/Calculus_of_variations
So using this, with $L(x,f(x)) = x^2f(x) - xf^2(x)$,
$$\frac{\partial L}{\partial f} = x^2 - 2xf(x) = 0$$
Hence $f(x) = \frac{x}{2}$, and maximum value is $\frac{1}{16}$
Alternate Solution
Rewrite the integral as
$$I = \int_0^1x^3\left(\frac{f(x)}{x} - \left(\frac{f(x)}{x}\right)^2\right)dx$$ Let $\frac{f(x)}{x} = y(x)$
$$I = \int_0^1x^3y(1-y)dx$$
Now, tha maximum attainable value for $y(1-y)$ is when $y = \frac{1}{2}$
Hence, $$I \leq \int_0^1 \frac{x^3}{4}dx$$
With equality occuring only when $f(x) = \frac{x}{2}$