We call two ensembles $X$ and $Y$ indistinguishable in polynomial time if for every probabilistic polynomial-time algorithm $D$ and for every positive polynomial $p(\cdot)$, and all sufficiently large n's we have $$|Pr[D(X_n,1^n)=1]-Pr[D(Y_n,1^n)=1]| < \frac{1}{p(n)}$$.
One question I didn't confront with at the beginning is, does the definition imply that $|X_n|=|Y_n|$?
After a little bit of thinking I came to the following conclusion which I want to verify. $X_n$ can be distributed over $\{0,1\}^{poly_1(n)}$ while $Y_n$ is distributed over $\{0,1\}^{poly_2(n)}$. For sufficiently large $n$ the polynomials grow monotonously and one could use the length as a distinguishing attack. We know there exists a distinguisher that makes by coincidence use of the very exact same polynomial $p_1$ or $p_2$ and can easily compare the lengths of the input with its hardwired polynomial. We would require that an $N$ exists such that $|X_n|=|Y_n|$ is true for all $n>N$ (which would imply the polynomials to be equal), else we will never be able to find such ensembles.