Constructing scheme for indistinguishability test with variable length messages Say $\Pi=[Gen,Enc,Dec]$ private key encryption scheme, such that for $k \in \text{{0,1}}^n$, $Enc_k$ is only defined for message of length at most $p(n)$. (for some polynomial) 
I need to construct a scheme for eavesdrop indistinguishability test where the eavesdrop isn't restricted to output equal-length message. 
I saw a paper (last question) where given plaintext $m$ of length at most $p(n)$, they first padded $m$ from the left side with $0^{p(n)-|m|-1}1$ to get a message of length $p(n)$, and then applied $Enc_k(.)$ on the result. For decryption, they first used $Dec_k(.)$ on the ciphertext, and then parsed $0^t1$ to leave only $m$. 
But what if for example, I want to encrypt the messages $0^t10^{p(n)-t-1}$ and $0^{p(n)-t-1}$ for some $1 \leq t \lt p(n)-1$, won't they be encrypted to the same cipher text?
That homework assignment is not entirely precise: If you allow $|m| = p(n)$, the padding doesn't make sense: $0^{-1}1$. Therefore, you would have to limit $|m| \leq p(n)-1$ to avoid that case.

For your example and question: You're right, if you consider that a prefix $0^{-1}1$ actually is the empty string (no padding). Then your strings are equal. However, that case is actually undefined and should be fixed with reducing the message length by $1$.

From an information theoretic point of view:
There are $2^{n}$ messages of length (exactly) $n$. And there are $\sum_{k=0}^{n}2^k = 2^{n+1} - 1$ messages of length $n$ or less. So if you consider the set of all messages of length $n$ or less, and consider those shorter messages as different messages, then you actually have $n+1$ bits of entropy (rounded to the next integer) and need at least a message of $n+1$ bits length to encode that information.