If we know $\pi_1(X),\pi_1(Y)$, what we can say about existence of retraction $X$ onto $Y$ and vice versa. I think if $\pi_1(X)$ is 'smaller' than $\pi_1(Y)$ there is no retraction $X$ onto $Y$.
For example if $X = S^1\times D^2$ and $Y = S^1 \times S^1$ there is no retraction $X $ onto $Y$ because $\pi_1(X) = \mathbb{Z}$ and $\pi_1(Y) = \mathbb{Z^2}$
Are there some results about it?
If $X\rightarrow Y$ is a retraction, then the inclusion $Y\rightarrow X$ induces a morphism $\pi_1(Y)\rightarrow\pi_1(X)$, which is an injection by functoriality, hence $\pi_1(Y)$ is isomorphic to a subgroup of $\pi_1(X)$. This gives an obstruction, e.g. if $\pi_1(X)$ is trivial and $\pi_1(Y)$ is not then we cannot have a retraction $X\rightarrow Y$. This addresses your very nice example, since $\mathbf{Z}^2$ certainly cannot be isomorphic to a subgroup of $\mathbf{Z}$.