Recall a Polish space is a completely metrizable separable space.
Say a Polish space $Y$ is a terminal space if for any Polish space $X$ and any closed $C \subseteq X$, one can extend a continuous map $f: C \rightarrow Y$ to a continuous map $g : X \rightarrow Y$. (Examples of terminal spaces include $\mathbb{R}^n$, $C([0,1])$, $[0,1]^\mathbb{N}$. In the $\mathbb{R}^n$ case this is the Tietze extension theorem.)
Say a Polish space $X$ is an initial space if for any Polish space (completely metrizable separable space) $Y$ and any closed $C \subseteq X$, one can extend a continuous map $f: C \rightarrow Y$ to a continuous map $g : X \rightarrow Y$. (Examples of initial spaces include $\mathbb{N}$, $2^\mathbb{N}$, and $\mathbb{N}^\mathbb{N}$. The proofs are easy. Also, initial spaces $X$ are "totally path disconnected" in that each continuous $h:[0,1] \rightarrow X$ is constant.)
1. Do these classes of spaces have names? (I made up the names "initial" and "terminal".)
2. Have they been previously studied?
3. Is there a nice classification of each type of space?
It is possible that questions have obvious answers and I just don't know enough topology to answer them, but if they do, then I assume this has already been recorded somewhere.
This is a simplified version of a previous MO question I was told is intractable. I am interested in this result due to its connections to uniform computation (in a sense, extending truth-table reducibility to other spaces).
Update 1: Kjos-Hanssen pointed out in the comments that my terminal spaces are similar to absolute retracts. In trying to figure out his comment, I realized that being terminal is equivalent to being an absolute retract for the class of Polish spaces.
[Proof: Let $Y$ be an absolute retract (for the class of Polish spaces) and consider $C \xrightarrow{f}{} Y \xrightarrow{i}{} C[0,1] \xrightarrow{r}{} Y$ where $f$ is a continuous map, $i$ is an isometric embedding (see Theorem 3.6 here), and $r$ is the continuous map that one gets from $Y$ being an absolute retract. Namely, $r(i(y))=y$ and so $r \circ i \circ f = f$. Then since $C[0,1]$ is terminal, one has an extension $g$ of $i \circ f$ to the domain $X \supseteq C$. Then $r \circ g$ is an extension of $f$. Hence $Y$ is terminal.
Now, let $Y$ be terminal and consider some Polish space $X$ containing $Y$ as a closed subspace. Since $Y$ is terminal, the continuous identity map can be extended to a continuous map $X \mapsto Y$. Therefore, $Y$ is an absolute retract for the class of Polish spaces.]
Update 2: (This is embarrassing...) I realize that Joseph Van Name already classified the initial spaces as the zero-dimensional Polish spaces in his answer to my previous MO question. I should have looked that question (from a year and a half ago) over more closely before asking this one. I had only remembered he told me that the more general question about which pairs $(X,Y)$ have this extension property is undecidable. I forgot he answered the special cases I just asked about here.