Okay so let me begin.
Mathematica itself does a semi-good job here. It find 2 solutions where one is not applicable for your startingcondition. So it finds the only solution which is
1/Sqrt[1 - 2 HeavisideTheta[-2 + t]]
But this only seems to work for $t<2$ and this is indeed right (we'll see later).
If we apply the Fourier- or Laplactransform we get what we deserve. (nothing we can work with because the $\delta$-function forces us to know $x(2)$)
$$x(t)=\theta(t-2)\cdot x(2)+C$$
Since 2 is a exact discontinuity we cannot use this.
But we can use the good old approach of seperation of variables so we solve it by hand:
$$\frac{\text{d}x(t)}{\text{d}t}=x^3(t)\cdot\delta(t-2)$$
$$\int\frac{1}{x^3(t)}\text{d}x(t)=\int\delta(t-2)\text{d}t$$
$$-\frac{1}{2x^2(t)}=\theta(t-2)+C$$
Now we would like to use $(...)^{-1}$ but this will limit us to the domain of $t>2$ but this is okay, Mathematica solved it already for $t<2$.
We get:
$$x(t)=\pm\sqrt{C-\frac{\theta(t-2)}{2}}$$
with your condition:
$$x(t)=\pm\sqrt{1-\frac{\theta(t-2)}{2}}=const((2<t)\wedge(2>t))$$
So we look into the visualization:
Plot[{1/Sqrt[1-2 HeavisideTheta[-2+t]],Sqrt[1-HeavisideTheta[t-2]/2]},{t,-3,3},PlotRange->{{-3,3},{-5,5}},PlotStyle->{{Red},{Blue,Dashed}},PlotLegends->"Expressions"]

Oh look we have won! Our derived expression suprisingly also describes $t<2$.
Let's confirm that:
equ=x'[t]==x[t]^3*DiracDelta[t-2];
form=Sqrt[1-HeavisideTheta[t-2]/2];
FullSimplify[equ/.{x[t]->form,x'[t]->D[form,t]},{t\[Element]Reals,t<2}]
FullSimplify[equ/.{x[t]->form,x'[t]->D[form,t]},{t\[Element]Reals,t>2}]
FullSimplify[equ/.{x[t]->form,x'[t]->D[form,t]},{t\[Element]Reals,t==2}]
True
True
-(DiracDelta[0]/(2 Sqrt[4-2 HeavisideTheta[0]]))==DiracDelta[0] (1-HeavisideTheta[0]/2)^(3/2)
Year. Exactly what we expected. Our formula desribes it perfectly EXCEPT in $t=2$.
t
when a condition isx[1] == 1
l that leads toC[1] == -1/2
. The second solution is empty for this initial condition, and this is what the first message is about. Next, not every differential equation has a solution that is valid on $(-\infty,+\infty)$, and this is just the case here. $\endgroup$FunctionDomain[ 1/Sqrt[1 - 2 HeavisideTheta[-2 + t]] /. HeavisideTheta -> UnitStep, t]
givest < 2
. Mathematica doesn't want to work withHeavisideTheta
inFunctionDomain
, hence the replacement to an equivalentUnitStep
. $\endgroup$DiracDelta
is connected withHeavisideTheta
viaHeavisideTheta'[t] == DiracDelta[t]
. The internal algorithms ofDSolve
seem to rely on this relation. $\endgroup$