Find $\displaystyle \theta \ \ s.t. \ \ \Delta^{2}\phi=0, \ \ a<r<b \ \ with \ \ \phi=\sin^{2}\theta, \ \ both \ \ when \ \ r=a \ \ and \ \ r=b $
I'm guessing what you mean is find $\displaystyle \phi $ not $\displaystyle \theta $. From your BC, it's desirable to switch to polar coords, so your PDE becomes
$\displaystyle
\phi_{rr} + \frac{\phi_r}{r} + \frac{\phi_{\theta \theta}}{r^2} = 0
$ with your BC $\displaystyle \phi(a,\theta) = \phi(b,\theta) = \frac{1}{2} - \frac{\cos 2 \theta}{2}$
We'll shift the BC a bit by introducing $\displaystyle \psi = \phi - \frac{1}{2}$ so the PDE is the same but the new BCs is $\displaystyle \psi(a,\theta) = \psi(b,\theta) = - \frac{\cos 2 \theta}{2}$. Fortunately for us, this problem admits separable solutions so
$\displaystyle
\psi = \left( c_1 r^2 + \frac{c_2}{r^2}\right) \left( A \sin 2 \theta + B \cos 2 \theta \right)
$
Applying the boundary condtions gives us (we can set $\displaystyle B = 1$ wlog)
$\displaystyle
c_1 = - \frac{1}{2(a^2+b^2)},\;\;\; c_2 = -\frac{1}{2} \frac{a^2b^2}{a^2+b^2},
$
which leads to the final solution
$\displaystyle
\phi = \frac{1}{2} - \frac{1}{2(a^2+b^2)} \left(r^2 + \frac{a^2b^2}{r^2} \right)\cos 2 \theta.
$
Side note: Title says Legendre polynomial - not sure why? They typically arise in 3D geometries but nothing in this post suggest that the problem is in $\displaystyle \mathbb R^3$.