Let me restate the U(1)$U(1)$ problem of QCD:
Let us forget about the $s$ quark, and consider the $u$ and $d$ massless. This is a good approximation since $m_{u,d} \ll \Lambda_{QCD}$. Then $\mathscr{L}_{QCD}$ has a $U(2)_L \otimes U(2)_R = U(1)_A \otimes U(1)_V \otimes SU(2)_{A} \otimes SU(2)_{V} $$$U(2)_L \otimes U(2)_R ~=~ U(1)_A \otimes U(1)_V \otimes SU(2)_{A} \otimes SU(2)_{V}$$ symmetry. Where $A$ refers to axial and $V$ to vectorial. The $SU(2)_{L-R}$ is spontaneously broken leading to the emergence of a triplet of pseudoscalar Goldstone bosons.
The puzzle regards $U(1)_{A}$ which turns out cannot be spontaneously broken since (according say to Schwarz p. 637) it is anomalous and hence it is not a symmetry in the first place.
The suggested solution to the above problem is the one due to Peccei and Quinn. They introduced a $U(1)_{PQ}$ which is subject to axial anomaly as well. However, even though the symmetry is anomalous, we know its spontaneous symmetry breaking leads to axions. How come this symmetry - even though it's anomalous - can be spontaneously broken?