Let's start with the unsquared sum: $$\sum_{i \ne j} \cos(\theta_i - \theta_j).$$ We can expand $\cos(\theta_i - \theta_j)$ as $\cos \theta_i \cos\theta_j + \sin\theta_i \sin\theta_j$. We'll be summing this over all pairs $(i,j)$ with $i \ne j$, but that's awkward, so let's add and then subtract the diagonal sum: $$\sum_{i=1}^n \sum_{j=1}^n \left(\cos\theta_i \cos\theta_j + \sin\theta_i \sin\theta_j\right) - \sum_{i=1}^n (\cos^2 \theta_i + \sin^2\theta_i).$$ We can rewrite this as $$\left(\sum_{i=1}^n \cos\theta_i\right)^2 + \left(\sum_{i=1}^n \sin\theta_i\right)^2 - n.$$ A lower bound on this is $-n$ (since the squared sums are nonnegative) and this can be achieved by spacing out $\theta_1, \dots, \theta_n$ symmetrically around the unit circle. To see this, think of the two squared sums here as the $x$- and $y$-coordinates of the vector sum of $(\cos \theta_i, \sin\theta_i)$ for $i=1, \dots, n$; if these vectors point in evenly spaced directions, then their sum is the zero vector!
Meanwhile, since $\cos^2 x = \frac{1+\cos 2x}{2}$, the sum with the squared cosine terms can be rewritten as follows: $$\sum_{i\ne j} \cos^2(\theta_i - \theta_j) = \sum_{i\ne j} \frac{1 + \cos(2\theta_i - 2\theta_j)}{2} = \sum_{i\ne j} \frac12 + \frac12 \sum_{i \ne j} \cos(2\theta_i - 2\theta_j).$$
The first sum simplifies to $n(n-1)/2$, and the second sum (up to the factor of $\frac12$) is the same as the sum we previously looked at. (All the angles are doubled, but that's irrelevant, since we know nothing about the angles anyway.) So we get the lower bound $$\sum_{i\ne j} \cos^2(\theta_i - \theta_j) \ge n(n-1)/2 - n/2 = n^2/2 - n.$$ This can be achieved by choosing $\theta_1, \dots, \theta_n$ so that doubling them mod $2\pi$ produces evenly spaced angles around the unit circle.
So, in summary, the lower bound of $n^2/2$ isn't quite true for any $n$, but $n^2/2 - n$ is almost as good.