Before we begin, we need one result:
$$\int z^2 e^{-z^2}\, dz$$
Changing variables, this can be written as
$$-\frac{1}{2}\int z\,d(e^{-z^2})$$
Integrate by parts, set $s=z$, $ds=dz$, $dv=d(e^{-z^2})$, $v=e^{-z^2}$ we have
$$-\frac{1}{2}ze^{-z^2}+\frac{1}{2}\int e^{-z^2}\,dz=\frac{\sqrt{\pi}}{4}erf(z)-\frac{1}{2} ze^{-z^2}$$
Now we begin the problem. The solution is
$$u(x,t)=\frac{1}{\sqrt{4\pi t}} \int_{-1}^1 e^{-\frac{(x-y)^2}{4t}}(1-y^2)\,dy=\frac{1}{\sqrt{4\pi t}} \left( \int_{-1}^1 e^{-\frac{(x-y)^2}{4t}}\,dy- \int_{-1}^1 y^2e^{-\frac{(x-y)^2}{4t}}\,dy\right)$$
From now on, define $a=(x+1)/\sqrt{4t}$ and $b=(x-1)/\sqrt{4t}$ for notational simplicity.
In the first integral, substitute $z=(x-y)/\sqrt{4t}$ so that $dz=-dy/\sqrt{4t}$, so that
$$\int_{-1}^1 e^{-\frac{(x-y)^2}{4t}}\,dy=-\sqrt{4t}\int_a^b e^{-z^2}\,dz=\frac{\sqrt{4\pi t}}{2}\left(erf(a)-erf(b)\right)$$
In the second integral, substitute the same thing. Note that $y^2=x^2-2xz\sqrt{4t}+4tz^2$. So we have
$$ \int_{-1}^1 y^2e^{-\frac{(x-y)^2}{4t}}\,dy=-\sqrt{4t}\int_a^b x^2e^{-z^2}-2x\sqrt{4t} ze^{-z^2}+4tz^2 e^{-z^2}\,dz$$
Now integrate the three terms. The first one can be done using error function, the second one can be integrated directly, the third one using the result we obtained above:
$$ \int_{-1}^1 y^2e^{-\frac{(x-y)^2}{4t}}\,dy=-\sqrt{4t}\left[ \frac{x^2\sqrt{\pi}}{2}\left(erf(b)-erf(a)\right)+x\sqrt{4t}\left(e^{-b^2}-e^{-a^2}\right)+4t\left(\frac{\sqrt{\pi}}{4}erf(b)-\frac{\sqrt{\pi}}{4}erf(a)-\frac{1}{2}\frac{x-1}{\sqrt{4t}}e^{-b^2}+\frac{1}{2}\frac{x+1}{\sqrt{4t}}e^{-a^2}\right)\right]$$
Now all that is left is to combine the two and simplify. In the end, one obtains
$$u(x,t)=\left(\frac{1}{2}-\frac{x^2}{2}-t\right)erf\left(\frac{x+1}{\sqrt{4t}}\right)+\left(\frac{x^2}{2}-\frac{1}{2}+t\right)erf\left(\frac{x-1}{\sqrt{4t}}\right)+\sqrt{\frac{t}{\pi}}\left[(x+1)e^{-\frac{(x-1)^2}{4t}}+(1-x)e^{-\frac{(x+1)^2}{4t}}\right]$$