It follows from the law of cosines that if $a,b,c$ are the lengths of the sides of a triangle with respective opposite angles $\alpha,\beta,\gamma$, then $$ a^2+b^2+c^2 = 2ab\cos\gamma + 2ac\cos\beta + 2bc\cos\alpha. $$
For a cyclic (i.e. inscribed in a circle) polygon, consider the angle "opposite" a side to be the angle between adjacent diagonals whose endpoints are those of that side (it doesn't matter which vertex of the polygon serves as the vertex of that angle). Then for a cyclic quadrilateral with sides $a,b,c,d$ and opposite angles $\alpha,\beta,\gamma,\delta$, one can show that \begin{align} a^2+b^2+c^2+d^2 = {} & 2ab\cos\gamma\cos\delta + 2ac\cos\beta\cos\delta + 2ad\cos\beta\cos\gamma \\ & {} +2bc\cos\alpha\cos\delta+2bd\cos\alpha\cos\gamma+2cd\cos\alpha\cos\beta \\ & {}-4\frac{abcd}{(\text{diameter})^2} \end{align}
And for a cyclic pentagon, with sides $a,b,c,d,e$ and respective opposite angles $\alpha,\beta,\gamma,\delta,\varepsilon$, \begin{align} a^2 + \cdots + e^2 = {} & 2ab\cos\gamma\cos\delta\cos\varepsilon+\text{9 more terms} \\ & {} - 4\frac{abcd}{(\text{diameter})^2}\cos\varepsilon+ \text{4 more terms}. \end{align} And for a cyclic $n$-gon with sides $a_i$ and opposite angles $\alpha_i,$ \begin{align} \sum_{i=1}^n a_i^2 = {} & \text{a sum of }\binom{n}{2}\text{ terms each with coefficient 2} \\ & {} - \text{a sum of }\binom{n}{4}\text{ terms each with coefficient 4} \\ & {} + \text{a sum of }\binom{n}{6}\text{ terms each with coefficient 6} \\ & {} - \cdots \text{ and so on} \end{align} The number of terms depends on $n$ and the power of the diameter on the bottom is in each case what is needed to make the term homogeneous of degree 2 in the side lengths ("dimensional correctness" if you like physicists' language), and the alternation of signs continues.
I showed this by induction. It should work for infinitely many sides, too, by taking limits. Each term would then have a product of infinitely many cosines.
My question is: Is there some reasonable geometric interpretation of the sum of squares of sides of a polygon inscribed in a circle?
Later note:The question was in part inspired by a similar situation in which there is a simple geometric interpretation of the right side of the identity. That looks like this:
$$ \begin{align} & 2\left(\frac{abc}{\text{diameter}}\cos\delta\cos\gamma\cos\zeta\cos\eta\cdots\right) + \text{all other terms with 3 sides} \\ & {} - 4 \left( \frac{abcde}{(\text{diameter})^3} \cos\zeta\cos\eta\cdots \right) + \text{other terms with 5 sides} \\ & {} + 6 \left(\text{similarly with 7}\right) - 8(\text{similarly with 9}) + \cdots \end{align} $$
That's one side of the identity. The other is $$ \text{diameter}\cdot (a\cos\alpha + b\cos\beta + c\cos\gamma + \cdots). $$ The expression on both sides is 4 times the area of the polygon. That's the simple geometric interpretation. The terms on the "other" side of the identity are signed areas of triangles with a vertex at the center of the circle. Notice that at most one of the cosines can be negative, and that happens precisely if the center of the circle is not in the interior of the polygon.