$\beta\mathbb{N}$ is not a retract of a Tychonoff cube because it is not connected; it also not a retract of a Cantor cube, not even a continuous image, see problem 3.12.12 in Engelking's book.
It is an absolute retract for ED spaces: if it is embedded in the compact ED space $X$ then $\mathbb{N}$ is relatively discrete subspace of $X$ and we have pairwise disjoint open sets $O_n$ in $X$ with $O_n\cap\beta\mathbb{N}=\{n\}$. Then the closure $K$ of the union $O=\bigcup_nO_n$ is clopen and by extremal disconnectedness $K=\beta O$. Now extend the retraction $r$ from $O$ onto $\mathbb{N}$, defined by $r(x)=n$ if $x\in O_N$, to $\beta r:K\to\beta\mathbb{N}$. As $r$ is the identity on $\mathbb{N}$ the extension $\beta r$ is the identity on $\beta\mathbb{N}$.