What do you mean by an irreducible Cartier divisor? Assume that $S$ is regular (you can weaken this) that $D$ is reduced, that $\mathcal X$ has finite inertia, and that $f^*D = kE$ for a reduced divisor. Then the result is true. The induced morphism $\mathcal X\to \sqrt[k]{D/S}$ is proper, because both stacks are proper over $S$; and from the hypothesis on $D$ it follows that $\mathcal X\to \sqrt[k]{D/S}$ is representable (this is an exercise, I can add more details if you'd like; the point is that $\mathcal X$ must have ramification index $k$ at each point of $E$). Then the result follows immediately.
Angelo
- 27k
- 6
- 92
- 112