Pioneering work on non-Euclidean geometries in the late 19th century led some theoreticians to consider the possibility of a universe of non-Euclidean geometry. For example, Nikolai Lobachevsky considered the case of a universe of hyperbolic (negative) spatial curvature and noted that the lack of astronomical observations of stellar parallax set a minimum value of 4.5 light-years for the radius of curvature of such a universe (Lobachevsky 2010). On the other hand, Carl Friedrich Zöllner noted that a cosmos of spherical curvature might offer a solution to Olbers' paradox5 and even suggested that the laws of nature might be derived from the dynamical properties of curved space (Zöllner 1872). In the United States, astronomers such as Simon Newcomb and Charles Sanders Peirce took an interest in the concept of a universe of non-Euclidean geometry (Newcomb 1906; Peirce 1891 pp 174-175), while in Ireland, the astronomer Robert Stawall Ball initiated a program of observations of stellar parallax with the aim of determining the curvature of space (Ball 1881 pp 92-93; Kragh 2012a). An intriguing theoretical study of universes of non-Euclidean geometry was provided in this period by the German astronomer and theoretician Karl Schwarzschild, who calculated that astronomical observations set a lower bound of 60 and 1500 light-years for the radius of a cosmos of spherical and elliptical geometry respectively (Schwarzschild 1900). This model was developed further by the German astronomer Paul Harzer, who considered the distribution of stars and the absorption of starlight in a universe of closed geometry (Harzer 1908 pp 266-267).It cites a 2012 Helge Kragh paper, Geometry and Astronomy: Pre-Einstein Speculations of Non-Euclidean Space, for more details.
The finiteness of the speed of light was first detected by astronomers, and that turned out to be more-or-less equivalent to spacetime being non-Euclidean. Poincare and Minkowski showed this in their relativity papers.
Efforts to find a large-scale cosmological curvature of space have failed. Gravity can be interpreted as spacetime curvature, but the universe seems flat on a large scale.
General relativity is commonly interpreted as gravity being spacetime curvature, but Einstein did not view it that way. He did not really buy into non-Euclidean geometry explanations as we do today.
Charles S. Peirce wrote in 1891:
The discovery that space has a curvature would be more than a striking one; it would be epoch-making. It would do more than anything to break up the belief in the immutable character of mechanical law, and would thus lead to a conception of the universe in which mechanical law should not be the head and centre of the whole. It would contribute to the improving respect paid to American science, were this made out here. . In my mind, this is part of a general theory of the universe, of which I have traced many consequences, - some true and others undiscovered, - and of which many more can be deduced; and with one striking success, I trust there would be little difficulty in getting other deductions tested. It is certain that the theory if true is of great moment.This seems to be a clear anticipation of the possibility of curved space for cosmology.
While the possibility of space being non-Euclidean does not seem to have aroused interest among French astronomers, their colleagues in mathematics did occasionally consider the question, if in an abstract way only. As mentioned, many scientists were of the opinion that the geometry of space could be determined empirically, at least in principle. However, not all agreed, and especially not in France. On the basis of his conventionalist conception of science, Henri Poincaré argued that observations were of no value when it came to a determination of the structure of space. He first published his idea of physical geometry being a matter of convention in a paper of 1891 entitled “Les géométries non-euclidiennes,” and later elaborated it on several occasions.I do think that this is a misunderstanding of Poincare's conventionalism.
Euclidean geometry is axiomatized mathematics. No observation can have any bearing on the mathematical truth of a theorem of Euclidean geometry. If Euclidean geometry turns out not to match the real world, then there are multiple ways to explain it. One could use Euclidean geometry as the foundation, or some other geometry.
That is surely what Poincare was saying. After all, Poincare was a pioneer in non-Euclidean geometry, and was the first to discover the non-Euclidean structure of spacetime. I have seen philosophers claim that Poincare was somehow opposed to geometrical interpretations of space, but I don't see how that could be true. He was simply distinguishing between mathematical and physical truths. Mathematicians consider the distinction to be very important, but physicists sometimes deny that there is a distinction.