Could we expect that $$\inf_{\theta\neq \text{regular polygon}}S(\theta)\sim f(n)$$where $S(\theta):=\inf_{\theta\neq \text{regular polygon}}\Big\{\Big(\sum_{i\in[n]}\sum_{j\in[n]}\cos(\theta_i-\theta_j)\Big)^2-{\sum_{i\in[n]}(\sum_{j\in[n]}\cos(\theta_i-\theta_j))^2}\Big\}$, $f(n)$ is an increasing function on $n$, and $\theta_i,i\in[n]$ are angles in $[0,2\pi]$.
Reformulate $\theta_i$ as $v_i=:=(\cos\theta_i,\sin\theta_i)$, above is equivalent to $$(\sum_{i\in[n]}\sum_{j\in[n]}\langle v_i,v_j \rangle)^2-\sum_{i\in[n]}(\sum_{j\in[n]}\langle v_i,v_j \rangle)^2$$
It is clear that $(\sum_{i\in[n]}\sum_{j\in[n]}\langle v_i,v_j \rangle)^2\geq \sum_{i\in[n]}(\sum_{j\in[n]}\langle v_i,v_j \rangle)^2$, where equality is attaned at the following case (2).
What I tried.
analyze on two special $\theta$.
(1)$\theta$ a vectors containing elements that are all equal.
In this case, $\sum_i(\sum_j\cos(\theta_i-\theta_j))^2=n^3$ and $(\sum_i\sum_j\cos(\theta_i-\theta_j))^2=n^4$
(2)$\theta$ forms a regular polygon.
In this case, $\sum_i(\sum_j\cos(\theta_i-\theta_j))^2=(\sum_i\sum_j\cos(\theta_i-\theta_j))^2=0$. To see this, we can write each $\theta_i$ as a vector $v_i:=(\cos\theta_i,\sin\theta_i)$. It is clear that $\sum_j\cos(\theta_i-\theta_j)=\sum_j\langle v_i,v_j \rangle=0$, and the conclusion can be followed.
Question
If we remove case (2), could we expect that $\inf S(\theta)$ being an increasing function of $n$?
If not, could we find a region of $\theta$ such that it is?