In other words, you are interested in the spaces where *isometric subsets are congruent*. If the metric space is locally compact and intrinsic and simply-connected then you get only spheres, Euclidean spaces and hyperbolic spaces. If not simply-conected, then in addition you get real projective spaces. [See *Sur certaines classes d'espaces homogènes de groupes de Lie* by Tits (1955); thanks to [Linus][1] for [the reference][2]] Without assuming local compactness, the same conclusion holds assuming local uniqueness of geodesics [See *Metric foundations of geometry. I* by Birkhoff]. Without this extra assumption you also get the so-called [universal $\mathbb{R}$-trees][3] of finite valence. Here is a [related question][4]. If the metric is not intrinsic you get discrete spaces and yet Cantor-like spaces build on them (who knows what else). Yet in [Urysohn universal space][5] the property holds for compact subsets. [1]: https://mathoverflow.net/users/37911/linus [2]: https://mathoverflow.net/a/428148/ [3]: https://arxiv.org/abs/math/9904133 [4]: https://mathoverflow.net/q/429702/ [5]: https://en.wikipedia.org/wiki/Urysohn_universal_space