First of all, I suppose that you are referring to distance in space, and not to distance in spacetime (which is invariant as shown in the answer of user122066).
Special relativity reserves a clear answer what length is with regard to length contraction, and this principle may be adopted by general relativity including the Schwarzschild solution.
For the explanation, I begin with a simplified model where the worldline of Earth is stationary with regard to Sun (that means if both were belonging to the same reference frame). In this case, the proper distance is the distance between Earth and Sun measured by observers of the reference frame Earth-Sun. The proper distance is the longest distance that can be measured. Observers which are moving with respect to the reference frame Earth-Sun are observing shorter distances, because the observed distance is subject to Lorentz contraction.
However, Earth and Sun are not belonging to the same frame of reference. The work which has to be done in this case must start from the model above, by appropriate synchronization, also taking into account the exact question you want to answer, in particular if you are referring to a particle (or several particles) moving from Earth to Sun (and from Sun to Earth, for synchronization purposes), or if you are not referring to a particle. Particles (mass particles or massless particles such as light) are needed for the synchronization.
I think that this is the exhaustive definition of distance that we get from special (and general) relativity.
(Edit further to the comment of goodqt)
However,in general,there will be many frames of reference which cannot
be synchronizable.
This is a highly interesting question. The question is concerning the problem of e.g. two stars in space at a far distance which are not related one with the other, perhaps even too far to send light signals from one to the other (one being not in the "observable universe" of the other).
According to the above explanations of my answer, there would be no distance! And also Slereah in the other answer comes to a similar conclusion:
"I'm not quite sure if the spatial distance between two points is well
defined, globally at least."
This is an incredible conclusion, indeed, and I hope that there will be other answers for your question which will put light on this issue.
Personally, I can provide you with one solution, but with all reserves because there might be other solutions provided which are based on curved spacetime, this would be interesting to know.
My solution is the following:
We have to consider the character of curved spacetime as a model for gravity, that means that we can imagine gravity as curved spacetime, but curved spacetime is only a tool of physics which must not necessarily represent the whole structure of the universe.
The Schwarzschild solution provides us with a mean of the replacement of curved spacetime by gravitational time dilation. That means: Gravitational time dilation is equivalent to curved spacetime which is gravity.
You may get an entry to the equivalency issue by the answer of John Rennie to this question.
By consequence, the model of curved spacetime of the Schwarzschild metric may be replaced by an alternative model describing gravity as mere time dilation.
In this alternative model, we have eliminated curved spacetime, and we are coming back to absolute space. And in this fact lies the answer to your question: In a model with absolute space, distances are well-defined!