$\bigl(\forall x \in D\bigr) \bigl(\exists y \in D\bigr) Q(x,y)$ has the form $\bigl(\forall x \in D\bigr) P(x)$, where $P(x)$ expands to $\bigl(\exists y \in D\bigr) Q(x,y)$. So it is vacuously true.
If you switch the order of the quantors, it becomes vacuously false, since you get a proposition of the form $\bigl(\exists y \in D\bigr) R(y)$ (with $R(y) = \bigl(\forall x \in D\bigr) Q(x,y)$).
When you have an empty domain $D$, only the outermost quantor matters, any outermost $\bigl(\forall x \in D\bigr)$ makes it vacuously true, $\bigl(\exists y \in D\bigr)$ vacuously false.