Write down the function $$ g(z) = \sum_{n\geq1} \frac{z^n}{n}H_n^2, $$ so that $S=g(-1)$ and $g$ can be reduced to $$ zg'(z) = \sum_{n\geq1} z^n H_n^2 = h(z). $$

Now, using $H_n = H_{n-1} + \frac1n$ ($n\geq2$), we can get a closed form for $h(z)$: $$h(z) = z + \sum_{n\geq2}\frac{z^n}{n^2} + \sum_{n\geq 2}z^n H_{n-1}^2 + \sum_{n\geq 2} 2\frac{z^n}{n}H_{n-1}. $$ Now, the first and third sums Mathematica can evaluate itself in closed form (the third one evaluates to the function $p(z)$ below, the first one is $\text{Li}_2(z)-z$), and the middle sum is $z h(z)$.

Substituting this into the expression for $g(z)$, we get $$g(z) = \int \frac{\text{Li}_2(z) + p(z)}{z(1-z)}\,dz, $$ $$p(z) = -\frac{\pi^2}{3} + 2\log^2(1-z)-2\log(1-z)\log(z)+2\text{Li}_2((1-z)^{-1}) - 2\text{Li}_2(z). $$ Mathematica can also evaluate this integral, giving (up to a constant of integration) \begin{align} g(z) &= \frac{1}{3} \left(-2 \log(1-z^3+3 \log(1-z)^2 \log(-z)+\log(-1+z)^2 (\log(-1+z)+3 \log(-z) \right. \\ & \hspace{5mm} \left. -3 \log(z))+\pi ^2 (\log(-z)-2 \log(z))+\log(1-z) \left(\pi^2 - 3 \log(-1+z)^2 \right. \right.\\ & \hspace{5mm} \left.\left. +6 (\log(-1+z)-\log(-z)) \log(z)\right)-6 (\log(-1+z)-\log(z)) \left(\text{Li}_{2}\left(\frac{1}{1-z}\right)-\text{Li}_{2}(z)\right) \right.\\ & \hspace{10mm} \left. -3 \log(1-z) \text{Li}_{2}(z)+3 \text{Li}_{3}(z)\right). \end{align} The constant of integration is fixed by requiring $g(0)=0$.

Some care needs to be taken, because the function is multi-valued, when evaluating $g(-1)$. The answer is $$ \frac{1}{12}(\pi^2\log2-4(\log 2)^3-9\zeta(3)). $$


let $$y=\sum_{n=1}^{\infty}H^2_{n}x^n$$

then we have $$y=x+xy+\ln^2{(1-x)}+\int_{0}^{x}\dfrac{\ln{(1-t)}}{t}dt$$

so $$y=\dfrac{\ln^2{(1-x)}}{1-x}+\sum_{n=1}^{\infty}\left(1+\dfrac{1}{2^2}+\cdots+\dfrac{1}{n^2}\right)x^n$$

then you can use:Proving an alternating Euler sum: $\sum_{k=1}^{\infty} \frac{(-1)^{k+1} H_k}{k} = \frac{1}{2} \zeta(2) - \frac{1}{2} \log^2 2$