II. (16 points) Let $-\frac{\pi}{2} \leqslant x \leqslant \frac{\pi}{2}$, and the equation $\cos 2x - 4a \cos x - a + 2 = 0$ has two distinct solutions. Find the range of values for $a$.
$$
2 \cos ^{2} x-4 a \cos x-a+1=0 \text {. }
$$

Let $t=\cos x$.
From $-\frac{\pi}{2} \leqslant x \leqslant \frac{\pi}{2}$, we know $0 \leqslant t \leqslant 1$.
Then the problem is transformed into the equation
$$
f(t)=2 t^{2}-4 a t-a+1=0
$$

in $0 \leqslant t \leqslant 1$.
(1) The equation has a unique solution in $0 \leqslant t \leqslant 1$ if and only if
$$
\left\{\begin{array}{l}
\Delta>0, \\
f(0) f(1) \leqslant 0 \text { and } f(1) \neq 0
\end{array}\right. \\
\Rightarrow \frac{3}{5}<a \leqslant 1 ;
\end{array}
$$
(2) The equation has a unique solution in $0 \leqslant t \leqslant 1$ if and only if
$$
\left\{\begin{array}{l}
\Delta=0, \\ 
0 \leqslant a<1
\end{array} \Rightarrow a=\frac{1}{2}\right.
$$
Therefore, from (1) and (2), the range of $a$ is $\frac{3}{5}<a \leqslant 1$ or $a=\frac{1}{2}$.