Good question. One way to think about differentiation which I think will clear some things up is to assume that there is a "standard candle" against which all differentiation is done.
That is, in your case you were noting that for the equation:
$$
x^2 = \cos(\theta)
$$
If you take the derivative with respect to $\theta$ you get
$$
\frac{d(x^2)}{d\theta} = -\sin(\theta)
$$
You noted that if you do the differentiation in the numerator you will get $d(x^2) = 2x\,dx$. But how do you know that these incremental changes "match up" so to speak?
The way to think about it is to assume that the differential operator is always in terms of some non-present standard candle. So, imagine a new variable, say $q$, which everything is ultimately dependent upon, but for which we do not have a formula. Therefore, we will say that $dq$ is some infinitely small difference (I usually use $\epsilon$ as the standard infinitesimal if I want to get concrete about it). You can think about the differential operator as always generating differentials which are relative to this standard candle. In fact, you can think about $dx$ and $d\theta$ as literally being relative values to our standard candle $dq$. Since $dq$ is a fixed value for our differential operator, then the relationships between $dx$ and $d\theta$ will hold true.