The complex vertices of an $n$-gon inscribed in a circle of unit radius are
$ P_k = e^{ \dfrac{2 \pi i k}{n}} , k = 0, 1, \dots, n-1$
Therefore, the indicated sum is
$ S = \displaystyle \sum_{j = 0}^{n-1} \sum_{k = j+1}^{n-1} \left(e^{\dfrac{2 \pi j i}{n}} - e^{\dfrac{2 \pi k i}{n}} \right) \left(e^{- \dfrac{2 \pi j i}{n}} - e^{- \dfrac{2 \pi ki }{n} }\right) $
and this equals
$ S = \displaystyle \sum_{j = 0}^{n-1} \sum_{k = j+1}^{n-1} \left( 2 - 2 \cos \left( \dfrac{ 2 \pi (j - k) }{n} \right) \right) $
Let $ m = k - j $ , then
$ S = \displaystyle \sum_{j = 0}^{n-1} \sum_{m = 1}^{n - 1 - j} \left( 2 - 2 \cos \left( \dfrac{ 2 \pi m }{n} \right) \right) $
It can be shown that this summation is equal to
$ S = n^2 $
To prove this,
Let $z = e^{\dfrac{2 \pi i}{n}} $
Then
$ A = \displaystyle \sum_{j = 0}^{n-1} \sum_{m = 1}^{n - j -1} \cos \left( \dfrac{ 2 \pi m }{n} \right) = \text{Re}\left( \sum_{j = 0}^{n-1} \sum_{m = 1}^{n - j-1} z^m \right) = \text{Re}\left(\sum_{j = 0}^{n-1} \dfrac{ z }{z - 1} ( z^{n-j-1} - 1 )\right) $
Changing the index of summation from $j$ to $k = n - j-1$, this summation becomes
$A= \displaystyle \text{Re}\left( \dfrac{z}{z-1} \sum_{k = 0}^{n-1} ( z^{k} - 1 )\right) = \text{ Re } \left(\dfrac{z}{z-1} \left( z \dfrac{ z^n - 1}{z-1} - n \right) \right) $
Note that $z^n = 1 $, therefore,
$ A = (-n) \text{ Re } \left(\dfrac{z}{z-1} \right) $
Now,
$ \dfrac{z}{z-1} = \dfrac{ e^{\dfrac{2 \pi i}{n}}}{ e^{\dfrac{2 \pi i}{n}} - 1 } = \dfrac{ e^{\dfrac{2 \pi i}{n}}}{ e^{\dfrac{\pi i}{n}} \left(e^{\dfrac{\pi i}{n}} - e^{\dfrac{-\pi i}{n}} \right) } = \dfrac{ e^{\dfrac{ \pi i}{n}}}{ 2 i \sin\left( \dfrac{ \pi }{n} \right)} $
Expanding the numerator using Euler's formula,
$ \dfrac{z}{z-1} = \dfrac{ \cos \left(\dfrac{\pi}{n}\right) + i \sin \left(\dfrac{\pi}{n}\right) }{ 2 i \sin \left( \dfrac{ \pi }{n} \right)} = \dfrac{1}{2} - \dfrac{1}{2} i \cot \left( \dfrac{ \pi }{n} \right) $
Therefore,
$ \text{Re} \left( \dfrac{z}{z-1} \right) = \dfrac{1}{2} $
Therefore,
$ A = - \dfrac{n}{2} $
Recall that
$ S =\displaystyle \left( \sum_{j = 0 }^{n-1} \sum_{m=1}^{n-j-1} 2 \right) - 2 A =\left(2 \sum_{j = 0 }^{n-1} \sum_{m=1}^{n-j-1} 1 \right) + n \\ \displaystyle = \left( 2 \sum_{j = 0}^{n-1} (n-j-1) \right) + n = \left( 2 \sum_{k = 0 }^{n-1} k \right) + n = n(n-1) + n = n^2 $
So yes, the indicated summation of the square of the diagonals is indeed equal to $n^2$.