Recording a CW-answer to take this off the unanswered list. The [Gegenbauer polynomials][1] are defined by the differential equation
$$(1-x^2) g'' - (2 \alpha+1) x g' +n(n+2 \alpha) g =0.$$
Putting $\alpha = -1/2$, we get
$$g=\frac{(x+1)(x-1)}{n(n-1)} g''.$$
If we want some other values for $a$ and $b$, we can put $f(x) = g(\ell(x))$ where $\ell$ is the affine linear function with $\ell(a) = -1$ and $\ell(b)=1$.

The Gegenbauer polynomials are orthogonal with respect to the weight $(1-x^2)^{\alpha - 1/2}$, so $(1-x^2)^{-1}$ in our case, so standard results on orthogonal polynomials tell us that the roots are in $[-1,1]$. If you are worried about the poles at $x = \pm 1$, then put $g_n(x) = (1-x^2) h_n(x)$, and the $h$'s are orthogonal with respect to $(1-x^2)$.


  [1]: https://en.wikipedia.org/wiki/Gegenbauer_polynomials