In $\theta$ the integral is
$$a^6 \int_\frac\pi4^\frac\pi2 \csc^7 \theta \,d\theta.$$
Now apply the reduction formula
$$\int \csc^m \theta \,d\theta = - \frac{1}{m - 1} \csc^{m - 2} \cot \theta + \frac{m - 2}{m - 1} \int \csc^{m - 2} \theta \,d\theta ,$$
which specializes for our limits to
$$\int_\frac\pi4^\frac\pi2 \csc^m \theta \,d\theta = 2^{\frac{m}2 - 1} + \frac{m - 2}{m - 1} \int_\frac\pi4^\frac\pi2 \csc^{m - 2} \theta \,d\theta ,$$
three times to express the integral in terms of
$$\int_\frac\pi4^\frac\pi2 \csc \theta \,d\theta = -\log |\csc \theta + \cot \theta| \Big\vert_\frac\pi4^\frac\pi2 = \operatorname{arsinh} 1 = \log(1 + \sqrt 2).$$
Performing these computations yields $$\boxed{a^6 \left(\frac{67 \sqrt 2}{48} + \frac{5}{16} \operatorname{arsinh} 1\right)}.$$