Here is a possible approach based on a formula of Zhang (see Page 432 of Wenpeng Zhang, On the mean values of Dedekind sums. J. Théor. Nombres Bordeaux 8 (1996), no. 2, 429–442.)
Recalling that
$$\cot\Big(\frac{\pi c}{p}\Big)=\frac{2p}{\pi\varphi(p)}\sum_{\chi(-1)=-1}\overline{\chi}(c)L(1,\chi)$$
and $\csc(x)=\cot(x/2)-\cot(x),$ we find
\begin{align*}
\sum_{1\leqslant k\leqslant p/2}\csc\Big(\frac{2\pi k^2}{p}\Big)
&=\sum_{1\leqslant k\leqslant p/2}\Big\{\cot\Big(\frac{\pi k^2}{p}\Big)-\cot\Big(\frac{2\pi k^2}{p}\Big)\Big\}\\
&=\frac{2p}{\pi\varphi(p)}\sum_{\chi(-1)=-1}\{1-\overline{\chi}(2)\}L(1,\chi)\sum_{1\leqslant k\leqslant p/2}\overline{\chi}(k^2)\\
&=\frac{p}{\pi\varphi(p)}\sum_{\chi(-1)=-1}\{1-\overline{\chi}(2)\}L(1,\chi)\sum_{k\bmod p}\overline{\chi}(k^2).
\end{align*}
By orthogonality, the above quantity becomes
\begin{align*}
\frac{p}{\pi}\{1-\overline{\chi}_2(2)\}L(1,\chi_2)=\frac{2p}{\pi}L(1,\chi_2),
\end{align*}
where $\chi_2$ denotes the quadratic character mod $p$ and we have used the fact that $\chi_2(2)=-1$ for $p\equiv3\bmod8$. The desired identity then follows from the class number formula of Dirichlet.