Spaces with unique endomorphism monoids If $(X,\tau)$ is a topological space, let $\text{End}(X)$ denote the collection of all continuous maps $f: X\to X$. With composition, this becomes the endomorphism monoid $(\text{End}(X), \circ)$.
We say that the space $X$ has a unique endomorphism monoid if $\text{End}(X) \cong \text{End}(Y)$ as monoids, for some space $Y$, then the spaces $X$ and $Y$ are homeomorphic.
Question. Is there for every infinite cardinality $\kappa$ a space $(X,\tau)$ with unique endomorphism monoid, and $|X| = \kappa$?
 A: While the OP question ultimately is specific (as it should), it really offers an entire topic:
TOPIC:  What are topological spaces
$\ (X\ T)\ $ which are topologically uniquely characterized by monoid $\ \text{End}(X\ T)\,?$
In other words, given an abstract monoid $\ M,\ $ can
we recover topological space $\ (X\ T)\ $ uniquely (if at all) so that $\ M\ $ and $\ \text{End}(X\ T)\ $ are isomorphic (as abstract algebraic monoids).
In this answer, let me provide some tools.
Let $\ \mathbf M:=(M\ \circ\ J)\ $ be an arbitrary monoid.  Let
$$ C\ :=\ \{c\in M:\ \forall_{f\in M}\ c\circ f=c\} $$
If $\ \mathbf M\ $ were isomorphic to $\ \text{End}(X\ T)\ $
then $\ C\ $ and $\ X\ $ would be in a canonical 1-1 correspondence as mentioned by @YCor in a comment to Dominic's 
real-question. This is the basic starting tool.
Next, let's discuss the next tool, the idempotents
$\ i\in\mathcal I\subseteq M,\ $ where
$$ \mathcal I\ :=\ \{i\in M:\ i\circ i=i\} $$
For instance, the unit $\ J\in M\ $ and constants
$\ c\in C\ $ are all idempotents.
Definition
$$ \forall_{i\ j\,\in\mathcal I}\quad
    (\,i\subseteq j\ \Leftarrow:\Rightarrow\
      j\circ i=i\,) $$
It follows that:


*

*$\ \forall_{i\in\mathcal I}\quad i\subseteq i;$

*$\ \forall_{i\ j\ k\in\mathcal I}\quad(
    (i\subseteq j\ \text{and}\ j\subseteq k)\ \Rightarrow
      i\subseteq k) $

*$\ \forall_{i\in\mathcal I}\,
      \forall_{j\in C}\quad
       (\ i\subseteq j\ \Rightarrow\ j=i\ ) $
Topological idempotents $\ i:X\to X\ $ are closely related to Karol Borsuk's retractions; such idempotent
$\ i\ $ retract $\ X\ $ retracts $\ X\ $ onto
$\ i(X)\subseteq X. $
By Bourbaki theorem, $\ (X\ T)\ $ is Hausdorff
$\ \Leftrightarrow\ \Delta_X:=\{(x\ x):x\in X\ $ is closed in $\ X\times X.$ It follows that for Hausdorff spaces the said retract $\ i(X)\ $ is closed in $\ X.\ $ Indeed,
$$ i(X)\ :=\ \{x:\ i(x)=x\}\ =
   \ (i\triangle \text{Id}_X)^{-1}(\Delta_X) $$
for diagonal product function
$\ i\triangle \text{Id}_X : X\to X\times X.$
Great!. (This is obviously useful for Hausdorff spaces).
Let $\ \pi:\mathcal I\to 2^C\ $ be defined by
$$ \forall_{i\in\mathcal I}\quad \pi(i)\ :=
         \ \{c\in C:\ i\circ c = c\} $$
This is how idempotents of $\ \mathbf M\ $ point to the respective subsets of $\ X;\ $ or to closed subsets in the Hausdorff case -- I mean pointing to $\ \pi(i).$
Theorem


*

*$\ \forall_{i\ j\in\mathcal I}\quad(\,i\subseteq j
    \ \Rightarrow \pi(i)\subseteq\pi(j)\, ) $

*$\ \forall_{i\ j\in\mathcal I}\quad(\,(i\subseteq j
      \ \text{and}\ j\subseteq i)
    \ \Rightarrow\ \pi(i)=\pi(j)\, ) $

*$\ \forall_{i\in\mathcal I}\quad (\, i\in C
    \ \Leftrightarrow\ \pi(i)=\{i\} $
Another tool, the uc-morphisms and nuc-morphims, was mentioned in my answer to Dominic's-real-question. In topological language, if $\ i\ $ is a topological idempotent then $\ I(X)\ $ has or has not fpp when $\ i\ $ is an uc-morphism or nuc-morphism respectively.
These tools may serve as a starting point to a discussion of specific topological spaces or their classes.
A: $\DeclareMathOperator\End{End}$As shown in Todd Trimble’s comment, the set of constant maps $X\to X$ is definable in $\End(X,\tau)$, as it consists of exactly the left-absorbing endomorphisms (i.e., $\phi\in\End(X,\tau)$ such that $\phi\circ\psi=\phi$ for all $\psi\in\End(X,\tau)$). Thus, an isomorphism $F\colon\End(X,\tau)\to\End(Y,\sigma)$ induces a bijection $f\colon X\to Y$ such that $F(c_x)=c_{f(x)}$ for all $x\in X$, where $c_x\colon X\to X$ is the constant-$x$ map. But then $F$ is completely determined by $f$ by
$$F(\phi)(f(x))=f(\phi(x))$$
for all $\phi\in\End(X,\tau)$: indeed, we have
$$c_{f(\phi(x))}=F(c_{\phi(x)})=F(\phi\circ c_x)=F(\phi)\circ F(c_x)=F(\phi)\circ c_{f(x)}=c_{F(\phi)(f(x))}.$$
Since we may as well assume that $X=Y$ and $f$ is the identity, it follows that:

Lemma 1. $(X,\tau)$ has a unique endomorphism monoid iff it is homeomorphic to all spaces of the form $(X,\sigma)$ such that $\End(X,\tau)$ and $\End(X,\sigma)$ are literally equal (i.e., a map $X\to X$ is an endomorphism of $(X,\tau)$ iff it is an endomorphism of $(X,\sigma)$.)

This implies

Proposition 2. If $(X,\le)$ is a total order which is isomorphic to its opposite order, then the Alexandrov space $(X,\tau)$ of upper sets of $(X,\le)$ has a unique endomorphism monoid. In particular, there exist such spaces of arbitrary cardinality.

Indeed, let $\sigma$ be a topology on $X$ such that $\End(X,\sigma)$ consists of the order-preserving maps. We may assume $|X|\ge2$. Then $\sigma$ cannot be indiscrete, hence we can fix $V\in\sigma$ and $a$ and $b$ such that $a\notin V$, $b\in V$. Assume first $a<b$. Then $\tau\subseteq\sigma$: consider an upper set $U\in\tau$. The map
$$\phi_{a,b,U}(x)=\begin{cases}b&x\in U,\\a&x\notin U\end{cases}$$
is order-preserving, hence $\phi_{a,b,U}\in\End(X,\sigma)$, and $\phi_{a,b,U}^{-1}[V]=U$, thus $U\in\sigma$. In fact, $\sigma=\tau$: if we assume for contradiction that $W\in\sigma$ is not an upper set, then the argument above shows that $\sigma$ also includes all lower sets, thus for any upper set $U$, $\phi_{b,a,U}\in\End(X,\sigma)$, but $\phi_{b,a,U}$ is not order-preserving if $U\notin\{\varnothing,X\}$.
Dually, if $a>b$, we obtain that $\sigma$ consists of all lower subsets of $X$, hence it is the Alexandrov topology corresponding to the opposite of $\le$, but this is homeomorphic to $(X,\tau)$ by our assumption on $\le$.

One can generalize the argument to a complete characterization for Alexandrov spaces. (Note that in particular, all finite spaces are Alexandrov.)  First, a lemma. If $(X,\tau)$ is a topological space, let $x\le_\tau y$ denote the specialization preorder $x\in\overline{\{y\}}$, and $x\sim_\tau y$ the indistinguishability equivalence $x\le_\tau y\land y\le_\tau x$.

Lemma 3. If $\End(X,\tau)=\End(X,\sigma)$, then ${\sim_\tau}={\sim_\sigma}$ unless one space is discrete and the other indiscrete.

Proof: If, say, $a\sim_\tau b$ but $a\nsim_\sigma b$, then all mappings $X\to\{a,b\}$ are in $\End(X,\tau)$, hence in $\End(X,\sigma)$, hence $(X,\sigma)$ is discrete, hence all mappings $X\to X$ are in $\End(X,\tau)$, hence $(X,\tau)$ is indiscrete lest $a\nsim_\tau b$. QED

Proposition 4. If $(X,\tau)$ is an Alexandrov space, then $\End(X,\tau)\simeq\End(Y,\sigma)$ if and only if

*

*$(Y,\sigma)$ is homeomorphic to $(X,\tau)$, or


*$(Y,\sigma)$ is homeomorphic to the opposite of $(X,\tau)$ (i.e., the Alexandrov space corresponding to $\ge_\tau$), or


*the two spaces are the discrete and indiscrete topologies on sets of the same cardinality.
Consequently, $(X,\tau)$ has a unique endomorphism monoid iff $(X,\le_\tau)\simeq(X,\ge_\tau)$, and $\tau$ is neither discrete nor indiscrete unless $|X|\le1$.

Proof: The right-to-left implication is clear. For the left-to-right implication, we may assume $X=Y$ and $\End(X,\tau)=\End(X,\sigma)$ as above.
Assume first that $\le_\tau$ is an equivalence (i.e., ${\le_\tau}={\sim_\tau}$). By Lemma 3, we may assume that ${\sim_\tau}={\sim_\sigma}$ and $\tau$ is not indiscrete. (If $\tau$ is indiscrete, then either $\sigma$ is discrete and we are done, or ${\sim}_\sigma={\sim}_\tau$, hence $\sigma$ is indiscrete, i.e., $\sigma=\tau$, and we are also done.) Since $\tau$ is the finest topology with indistinguishability relation $\sim_\tau$, this implies $\sigma\subseteq\tau$; on the other hand, if we fix $a\nsim_\tau b$, and w.l.o.g. $a\lnsim_\sigma b$, then $\phi_{a,b,U}$ is in $\End(X,\sigma)$ for all $U\in\tau$, hence $U\in\sigma$, i.e., $\sigma=\tau$.
If $\le_\tau$ is not an equivalence, let us fix $a\lnsim_\tau b$. This also implies we can fix $V\in\tau$ whose complement is not in $\tau$. Then $\phi_{a,b,V}\in\End(X,\tau)$ and $\phi_{b,a,V}\notin\End(X,\tau)$, hence $a\lnsim_\sigma b$ or $b\lnsim_\sigma a$. W.lo.g., we assume the former (the other choice leads to the opposite order). Then for each $U\in\tau$, $\phi_{a,b,U}\in\End(X,\tau)$ implies $U\in\sigma$, i.e., $\tau\subseteq\sigma$. Since $\tau$ is the finest topology with specialization preorder $\le_\tau$, if $\tau\subsetneq\sigma$, then (in view of ${\sim_\tau}={\sim_\sigma}$) there are $x,y$ such that $x\lnsim_\tau y$ and $x\nleq_\sigma y\nleq_\sigma x$. But as above, this contradicts $\phi_{x,y,V}\notin\End(X,\sigma)$ for suitable $V\in\tau$. Thus, $\tau=\sigma$. QED

The characterization can be easily extended to all non-$R_0$ spaces. Recall that $(X,\tau)$ is $R_0$ if $\le_\tau$ is symmetric (i.e., ${\le_\tau}={\sim_\tau}$).

Proposition 5. If $(X,\tau)$ is a non-Alexandrov non-$R_0$ space, then $(X,\tau)$ has a unique endomorphism monoid.

Proof: Assume that $\End(X,\tau)=\End(X,\sigma)$. Let us fix $a\lnsim_\tau b$. There exists $V\in\tau$ whose complement is not in $\tau$ (e.g., any open set separating $b$ from $a$); then $\phi_{a,b,V}\in\End(X,\tau)$ and $\phi_{b,a,V}\notin\End(X,\tau)$, hence (1) $a\lnsim_\sigma b$ or (2) $b\lnsim_\sigma a$. (In particular, $(X,\sigma)$ is not $R_0$.) If (1) holds, then for every $U\in\tau$, $\phi_{a,b,U}\in\End(X,\tau)$ implies $U=\phi_{a,b,U}^{-1}[b]\in\sigma$, i.e., $\tau\subseteq\sigma$. If (2) holds, then the same argument gives $\{X\smallsetminus U:U\in\tau\}\subseteq\sigma$.
Since $(X,\sigma)$ is not $R_0$ either, a symmetric argument implies that (1') $\sigma\subseteq\tau$, or (2') $\{X\smallsetminus U:U\in\sigma\}\subseteq\tau$. It is impossible that (1) and (2') hold together: this would imply that $\tau$ is closed under complement, whence it is $R_0$. Likewise, (2) and (1') are incompatible. Thus, the only two possibilities are that either (1) and (2) hold, in which case $\tau=\sigma$, or (1') and (2') hold, in which case $\tau$ and $\sigma$ are mutually opposite Alexandrov spaces. QED
Notice that $(X,\tau)$ is $R_0$ iff the Kolmogorov quotient $X/{\sim_\tau}$ is $T_1$. It is easy to see that:

Lemma 6. If $(X,\tau)$ and $(X,\sigma)$ are spaces such that ${\sim_\tau}={\sim_\sigma}$, then $\End(X,\tau)=\End(X,\sigma)$ iff $\End((X,\tau)/{\sim_\tau})=\End((X,\sigma)/{\sim_\sigma})$.

In view of Lemma 3, this gives a reduction of the remaining classification to $T_1$ spaces. Observe that an $R_0$ space $(X,\tau)$ is Alexandrov iff $(X,\tau)/{\sim_\tau}$ is discrete.

Corollary 7. If $(X,\tau)$ is an $R_0$ non-Alexandrov space, then $(X,\tau)$ has a unique mononorphism monoid iff the $T_1$ space $(X,\tau)/{\sim_\tau}$ has a unique monomorphism monoid.

A: NOTATION
$$ S_X\ :=\ \{\emptyset\ X\} $$
$$ D_X\ :=\ 2^X\ =\ \{A:\ A\subseteq X\} $$
Given an arbitrary set $\ X,\ $ topology $\ S_X\ $ is the smallest (the weakest) topology in $\ X;\ $ and the discrete topology $\ D_X\ $ is the largest (the strongest) topology in $\ X.$
--------------------
Here is a logically initial modest positive result:
Theorem   Let set $\ X\ $ be finite. Then for every non-discrete topological space $\ (Y\ T)\ $ (i.e. $\ T\ne D_Y),\ $ if monoids $\ \text{End}(X\ S_X)\ $ and
$\ \text{End}(Y\ T)\ $ are isomorphic then topological spaces $\ (X\ S_X)\,$ and $\,(Y\ T)\ $ are homeomorphic, i.e. $\,\ |Y|=|X|\ $ and $\ T=S_Y.$
Proof   If two monoids are isomorphic than they have the same number (cardinality) of constants (of the left-absorbing elements). Furthermore, the number of points of an arbitrary topological space is equal to the number the constants of its monoid of continuous self-maps. 
Let's assume that monoids $\ \text{End}(X\ S_X)\ $ and
$\ \text{End}(Y\ T)\ $ are isomorphic. Then
$$ |X|\ =\ |Y| $$
Also,
$$ |\text{End}(X\ S_X)|\ =\ |\text{End}(Y\ T)|\ $$
hence
$$ |\text{End}(Y\ T)|\ =\ |\text{End}(X\ S_X)|
                \ =\ |X^X| $$
so that
$$ |\text{End}(Y\ T)|\ =\ |Y^Y| $$
This means that $\ T=S_Y\ $ or $\ T=D_Y\ $ hence,
by theorem's assumption, $\ T=S_Y\ $ --
otherwise $\ T\ $ would be not discrete nor the
smallest, i.e. there exists $\ G\ \in\ T\setminus S_Y\ $ and non-isolated $\ p\in Y\ $ (i.e. such that
$\ \{p\}\not\in T)$. Then consider $\ f:Y\to Y\ $ such that $ f(p)\in G\ $ and
$\ f(Y\setminus\{p\})\subseteq Y\setminus G.\ $ Such
$\ f\ $ is not continuous in $\ (Y\ T),\ $ hence
$$ |\text{End}(Y\ T)|\ <\ |Y^Y| $$
-- a contradiction.   End of PROOF
----------------
Remark For every set $\ X,\ $ monoids
$$ \text{End}(X\ S_X)\quad \text{and}\quad
        \text{End}(X\ D_X)\ $$
are isomorphic while the respective topological spaces $\ (X\ S_X)\ $ and $\ (X\ D_X)\ $ are not homeomorphic whenever $\ |X|>1.$
