Using the fact that for an integer $m$
$$\sum_{n=1;n\neq m}^\infty\frac1{n^2-m^2}=\frac3{4m^2}\tag{0}$$
(please, see below)
Let's suppose that $a, b\in N$, and $a\neq b$
$$S=\sum_{n=1;n\neq a,b}\frac{n^2}{(n^2-a^2)(n^2-b^2)}=\frac1{b^2-a^2}\sum_{n=1;n\neq a,b}\left(\frac{b^2}{n^2-b^2}-\frac{a^2}{n^2-a^2}\right)$$
$$=\frac1{b^2-a^2}(b^2S_b-a^2S_a)\tag{1}$$
where
$$S_b=\sum_{n=1;n\neq a,b}\frac1{n^2-b^2}=\left(\sum_{n=1;n\neq b}\frac1{n^2-b^2}\right)\,-\frac1{a^2-b^2}=\frac3{4b^2}\,-\frac1{a^2-b^2}\tag{2}$$
$$S_a=\sum_{n=1;n\neq a,b}\frac1{n^2-a^2}=\frac3{4a^2}\,-\frac1{b^2-a^2}\tag{3}$$
Using (1), (2) and (3)
$$\boxed{\,\,S=\sum_{n=1;n\neq a,b}\frac{n^2}{(n^2-a^2)(n^2-b^2)}=\frac{a^2+b^2}{(b^2-a^2)^2}, \,\,a\neq b\,\,}$$
There is also an interesting case $a=b$
$$S=\sum_{n=1;n\neq a}\frac{n^2}{(n^2-a^2)^2}=\sum_{n=1;n\neq a}\frac1{(n^2-a^2)}+a^2\sum_{n=1;n\neq a}\frac1{(n^2-a^2)^2}$$
We can show (please, see below) that
$$\sum_{n=1;n\neq a}\frac1{(n^2-a^2)^2}=-\,\frac{11}{16\,a^4}+\frac{\pi^2}{12\,a^2}\tag{4}$$
and, therefore,
$$\boxed{\,\,S=\sum_{n=1;n\neq a}\frac{n^2}{(n^2-a^2)^2}=\frac{\pi^2}{12}+\frac1{16\,a^2}\,\,}$$
To prove $\operatorname{(0)}$, let' suppose that $a$ is not an integer, and $a=m+\epsilon, \epsilon\to 0$.
Then
$$\sum_{n=1}^\infty\frac1{n^2-a^2}=\sum_{n=1;n\neq m}^\infty\frac1{n^2-a^2}+\frac1{m^2-(m+\epsilon)^2}$$
On the other hand,
$$\sum_{n=1}^\infty\frac1{n^2-a^2}=-\frac\pi2\frac{\cot\pi a}a+\frac1{2a^2}$$
Leading $a\to m$ ($\epsilon \to 0$)
$$\sum_{n=1;n\neq m}^\infty\frac1{n^2-m^2}-\frac1{2m\epsilon}+\frac1{4m^2}=-\frac{\pi}{2\pi m\epsilon}\big(1-\frac\epsilon{m}\big)+\frac1{2m^2}+O(\epsilon)$$
$$\Rightarrow\,\,\sum_{n=1;n\neq m}^\infty\frac1{n^2-m^2}=\frac3{4m^2}$$
To prove$\operatorname{(4)}$ we notice that for non-integer $a$
$$\sum_{n=1}^\infty\frac1{(n^2-a^2)^2}=\frac12\sum_{n=-\infty}^\infty\frac1{(n^2-a^2)^2}-\frac1{2a^4}$$
$$=\frac12\frac{\partial}{\partial (a^2)}\left(\sum_{n=-\infty}^\infty\frac1{n^2-a^2}\right)-\frac1{2a^4}=-\,\frac1{2a^4}+\frac\pi{4a^2}\left(\frac\pi{\sin^2\pi a}+\frac{\cot\pi a}a\right)$$
and then we use the same approach (leading $a$ to an integer $m$) as for the $\operatorname{(0)}$ above.