If I'm solving the differential equation in the title I will get to: $$\log(y)=-2\log(x)+c$$ then I'll get $y=e^c/x^2$ eith arbitrary constant $c$.
So I know I can write $y=d/x^2$ where $d$ is an arbitrary positive constant. But now it's easy to see that $d$ can be negative or zero as well. How can I see that from the derivation? Can I reason from the derivation that $d$ can be arbitrary? (I know I can just show $d$ can be arbitrary e.g. by calculating $y'$ and see that $d$ cancels out.)
If you're more careful, you can see that $d$ can be arbitrary.
First of all, to solve $xy' + 2y = 0$ as you have done, you need to rewrite it as $$\frac{y'}{y} = -\frac{2}{x},$$ but that assumes $y$ is non-zero. Treating the $y = 0$ case separately, you see that $y \equiv 0$ is a solution which can be rewritten as $$y = \frac{d}{x^2}$$ where $d = 0$.
As for the $d$ negative case, note that $\log x$ is not an antiderivative for $\dfrac{1}{x}$ on $\mathbb{R}\setminus\{0\}$ because the former isn't even defined for $x < 0$. The correct statement is that $\log|x|$ is an antiderivative for $\dfrac{1}{x}$ on $\mathbb{R}\setminus\{0\}$. Therefore, by antidifferentiating both sides of the equation
$$\frac{y'}{y} = -\frac{2}{x},$$
we obtain
$$\log|y| = -2\log|x| + c.$$
Now if you rearrange for $y$, the presence of absolute values will produce a $\pm$ which allows for negative $d$.