We are given $$a_1 = 1$$ and the recurrence $$a_{n+1} = \frac{1}{2}a_n + \frac{n^2 - 2n - 1}{n^2(n+1)^2}$$ for $$n \geq 1$$. We need to find $$\left|\sum_{n=1}^{\infty}\left(a_n - \frac{2}{n^2}\right)\right|$$.
Define a new sequence $$b_n = a_n - \frac{2}{n^2}$$ so that the desired sum is $$\left|\sum_{n=1}^{\infty}b_n\right|$$.
Since $$a_{n+1} = b_{n+1} + \frac{2}{(n+1)^2}$$ and $$a_n = b_n + \frac{2}{n^2}$$, substituting into the given recurrence yields
$$b_{n+1} + \frac{2}{(n+1)^2} = \frac{1}{2}\Bigl(b_n + \frac{2}{n^2}\Bigr) + \frac{n^2 - 2n - 1}{n^2(n+1)^2},$$
which simplifies to
$$b_{n+1} = \frac{b_n}{2} + \frac{1}{n^2} + \frac{n^2 - 2n - 1}{n^2(n+1)^2} - \frac{2}{(n+1)^2}.$$
Combining the terms with common denominator $$n^2(n+1)^2$$ gives
$$\frac{1}{n^2} + \frac{n^2 - 2n - 1}{n^2(n+1)^2} - \frac{2}{(n+1)^2} = \frac{(n+1)^2 + (n^2 - 2n - 1) - 2n^2}{n^2(n+1)^2}.$$
Expanding the numerator yields
$$(n^2 + 2n + 1) + (n^2 - 2n - 1) - 2n^2 = n^2 + 2n + 1 + n^2 - 2n - 1 - 2n^2 = 0,$$
so that $$b_{n+1} = \frac{b_n}{2}$$.
Thus the sequence $$\{b_n\}$$ is a geometric progression with common ratio $$r = \frac{1}{2}$$ and first term $$b_1 = a_1 - \frac{2}{1^2} = 1 - 2 = -1.$$
The sum of this infinite geometric progression is
$$\sum_{n=1}^{\infty} b_n = \frac{b_1}{1 - r} = \frac{-1}{1 - \frac{1}{2}} = \frac{-1}{\frac{1}{2}} = -2,$$
so $$\left|\sum_{n=1}^{\infty} b_n\right| = |-2| = 2.$$
Therefore, the required value is $$\boxed{2}$$.