This equality of integrals follows from a measure-theoretic change of variables, see @Dom's answer to this post. In other words, your equality of integrals will follow from an application of the Monotone Class Theorem for functions that are $\mathcal{B}((0,\infty))$-measurable provided we show the following.
Claim: Let $\lambda$ denote the Lebesgue measure on $\mathbb{R}$. Then, the pushforward measure $$D_*\lambda((a,b]) = \lambda(D^{-1}((a,b])), \quad 0\le a < b<+\infty$$
satisfies $D_*\lambda = \mathrm{d}Y$ as measures on $\mathcal{B}((0,\infty))$.
Now, to prove this, fix $0\le a < b < \infty$ and note that by monotonicity of $D$, $I_{a,b}:=D^{-1}((a,b])$ is an interval. Hence, we compute
$$D_*\lambda((a,b]) = \lambda(I_{a,b}) = \displaystyle\sup I_{a,b}- \inf I_{a,b}\,.$$
Claim: $\sup I_{a,b} = Y(b)$ and $\inf I_{a,b} = Y(a)$.
The proof of $\inf I_{a,b} = Y(a)$ is entirely analogous to that of the first equality and so is omitted. Now, to prove the first equality, observe that for all $x\in I_{a,b}$, $D(x)\le b$ and so (since $Y$ is the right inverse of $D$ for the first inequality) $x\le Y(D(x))\le Y(b)$ and we obtain that $Y(b)$ is an upper bound for $I_{a,b}$ and so $\sup I_{a,b} \le Y(b)$. Now, suppose for a contradiction that $\sup I_{a,b} < Y(b)$. Then, let $x_0$ be in $(\sup I_{a,b}, Y(b))$. Using the monotonicity of $D$ and for the second inequality the construction of $Y$ as an infimum, $b < D(x_0) \le b$, a contradiction.
Now, conclude by observing that $D_*\lambda((a,b])$ and $\mathrm{Y}$ are two $\sigma-$finite measures (as seen from the above proof) that agree on the $\pi-$system $\{(a,b]: 0\le a< b< \infty\}$ that generates $\mathcal{B}((0,\infty))$.