Do you mean:
$$-u_\theta=r^2 \\
\Rightarrow u=-r^2\theta
$$ and since it's not periodic we are done?
Basically yes, except certain things should be clarified: since our trajectories are closed each is parametrized by some parameter ($\theta$) running from $0$ to $T$ (in our case $T=2\pi$ but it may depend on trajectory) and equation looks like $\partial_\theta u= g(\theta,r)$. So we are looking for periodic solution
$u(\theta,r)=\int g(\theta,r)\,d\theta$.
Note that primitive of periodic function $g(\theta)$ is periodic if and only if average of $g$ over period is $0$:
$\int_0^T g(\theta)\,d\theta=0$. Otherwise this primitive is the sum of a periodic function and a linear function.
Finally, in (a) $g(\theta)=r^2 \sin(\theta)\cos(\theta)$ and integral over period is $0$; in (b) $g(\theta)=r^2$ and integral over period is not $0$.
So, the source of trouble is: periodic trajectories.