In the category of measurable spaces and measurable functions, suppose $Y$ is both the target of a regular epimorphism $e : X \to Y$, and the source of a regular monomorphism $m : Y \to X$. That is, $Y$ is both a subspace and a quotient. Is it the case that $Y$ is a retract of $X$, i.e. there exists a split epimorphism $e' : X \to Y$ (which may differ from $e$)?
I would also be interested in an answer to the same question in the category of topological spaces and continuous functions.
My suspicion is that the answer is no, but I have not found an explicit counterexample.
If the answer is "yes", does the statement also hold if the assumption that $e$ and $m$ are regular is removed (i.e. these become just an epi and a mono)?
Does this provide a counterexample? Let $X$ be a strip: $X = \mathbb{R} \times [0,1]$. Let $Y$ be a circle. There are plenty of nice embeddings $Y \to X$. There is a nice surjection $X \to Y$: project $X$ to $\mathbb{R}$ and then compose with the standard covering map $\mathbb{R} \to Y$. $X$ cannot be a retract of $Y$ because its fundamental group and homology groups are wrong.