I'll work with the condition $f(0)=f(1)=0, f(1/2)=1/2$.
The idea of the following calculation is to minimize $\int_0^1 f''(x)^2 \, dx $ on the intervals $[0, 1/2]$ and $[1/2, 1]$ separately. Without further restrictions that would give a minimum of zero, attained by a piecewise linear function, which is not (twice) differentiable on $[0, 1]$.
Therefore we introduce an additional parameter $a \in \Bbb R$ and minimize the integral over the left interval subject to the conditions $f(0) = 0, f(1/2) = 1/2, f'(1/2) = a$, and over the right interval subject to the conditions $f(1/2) = 1/2, f'(1/2) = a, f(1) = 0$.
Doing integration by parts,
$$
\frac 12 = f\left( \frac 12\right) - f(0) = \int_0^{1/2} f'(x) \, dx
= \left .x f'(x)\right]_{x=0}^{x=1/2} - \int_0^{1/2} x f''(x) \, dx \\
= \frac a2 - \int_0^{1/2} x f''(x) \, dx \, ,
$$
so that
$$
\left( \frac{a-1}{2}\right)^2 = \left( \int_0^{1/2} x f''(x) \, dx\right)^2
\le \int_0^{1/2} x^2 \, dx \cdot \int_0^{1/2} f''(x)^2 \, dx \\
= \frac{1}{24} \int_0^{1/2} f''(x)^2 \, dx \, .
$$
In the same way one can derive
$$
\left( \frac{a+1}{2}\right)^2 = \left( \int_{1/2}^1 (1-x) f''(x) \, dx\right)^2 \le \frac{1}{24} \int_{1/2}^1 f''(x)^2 \, dx \, .
$$
Combining these estimates one gets
$$
\int_0^1 f''(x)^2 \, dx \ge 24 \left( \frac{a-1}{2}\right)^2+ 24 \left( \frac{a+1}{2}\right)^2 = 12 (a^2 + 1) \ge 12 \, .
$$
Equality holds if $a=f'(1/2) = 0$ and $f''(x) = \text{const} \cdot x$ on $[0, 1/2]$ and $f''(x) = \text{const} \cdot (1-x)$ on $[1/2, 1]$, that leads to
$$
f(x) = \begin{cases}
-2 x^3 + \frac 3 2 x & \text{ for } 0 \le x \le \frac 12 \, , \\
2 x^3 -6 x^2 + \frac 92 x -1/2 & \text{ for } \frac 12 \le x \le 1 \, .
\end{cases}
$$
The following graph (created with wxMaxima) shows that function (blue) and, for comparison, the function $\sin(\pi x)/2$ (red).
Best Answer
This is essentially following the steps in my answer to a quasi-similar question. I'm not going to explain how I find the function $g(x)$ below.
Let $X = \mathcal{C}^2[0,1]$ and $P,Q,C : X \to \mathbb{R}$ be functionals over $X$ defined by
$$P(f) = \int_0^1 f''(x)^2 dx,\quad Q(f) = \int_0^1 f(x)dx\quad\text{ and }\quad C(f) = \int_{1/3}^{2/3} f(x) dx$$
The question can be rephrased as
Since both the inequality and constraint is homogeneous in scaling of $f$ by a constant. We can restrict our attention to those $f$ which satisfies $C(f) = 0$ and $Q(f) = 1$.
Consider following functions
$$\phi(x) = x^4 - \frac12 x^2 + \frac{29}{6480} \quad\text{ and }\quad \psi(x) = \begin{cases} \left(\frac13-x\right)^4, & x \le \frac13\\ 0, & \frac13 \le x \le \frac23\\ \left(x - \frac23\right)^4, & x \ge \frac23 \end{cases} $$ Combine them and define another function $g(x)$ by $$g(x) = -\frac{405}{11}\left[ \phi\left(x-\frac12\right) - \frac32 \psi(x) \right]$$ It is not hard to check
For any $f \in X$ with $C(f) = 0, Q(f) = 1$, let $\eta = f - g$, we have
$$\begin{align} & P(f) - P(g) - P(\eta)\\ = & 2\int_0^1 g''(x)\eta''(x) dx\\ = & 2\int_0^1 ( g''(x)\eta'(x))' - g'''(x)\eta'(x) dx\\ = & 2\int_0^1 ( g''(x)\eta'(x) - g'''(x)\eta(x))' + g''''(x)\eta(x)dx\\ = &2\left\{\left[ g''(x)\eta'(x) - g'''(x)\eta(x) \right]_0^1 + \frac{4860}{11}(Q(\eta)-C(\eta)) -\frac{9720}{11}C(\eta)\right\} \end{align} $$ What's in the square bracket vanish because of $(3)$. The remain terms vanish because
Together with the fact $P(\eta)$ is non-negative, we obtain:
$$P(f) = P(g) + P(\eta) \ge P(g) = \frac{4860}{11}$$.