Note that these are not initial conditions but rather boundary conditions, where you have information at 2 different points instead of the same point. Because these are not initial conditions, uniqueness is not guaranteed.
Looking at general solution
$$ x(t) = A\cos t + B\sin t $$
we have $x(0) = A$ and $x(\pi) = -A$
I'd wager that there is a typo in the problem statement, as this gives us $A=-A=3$ which yields no solution.
But suppose that the B.C's were consistent, such as $x(\pi)=-3$ or $x(2\pi)=3$, then a solution does exist with $A=3$, then
$$ x(t) = 3\cos t + B\sin t $$
As there is no constraints on the constant $B$, it is free to vary. Thus you have infinitely many solutions.
I suspect that this was the intent of the question, however the wording is faulty, as this isn't even an initial value problem to begin with.