If $G$ is a group such that every non-trivial subgroup is isomorphic to $G$ itself, then $G= \mathbb{Z}$ is the only infinite group with that property (up to isomorphism). Amongst the finite groups we essentially have $\mathbb{Z}/p\mathbb{Z}$ for $p$ prime.
Turning arrows around, let us say that a group $G$ has property $\text{Q}$ if
whenever $H$ is a non-trivial group and $s:G\to H$ is a surjective group homomorphism, then $H\cong G$.
Again $\mathbb{Z}/p\mathbb{Z}$ has this property for $p$ prime. (I don't know whether they are the only finite groups with property $\text{Q}$.) Note that $\mathbb{Z}$ does not have property $\text{Q}$.
Question. For which cardinals $\kappa\geq\aleph_0$, if any, is there a non-simple group with property $\text{Q}$ having cardinality $\kappa$?
Acknowledgement. Thanks to Dave Benson for suggesting to consider non-simple groups only.