Metric space gluing: the double-disk boundary metric This may not be well posed, but I hope you get the idea...

If two closed, flat disks of equal size are glued at their boundary, i.e. an equivalence is established between the two boundaries, I believe that the equivalence should be an isometry - i.e. distance preserving.

Now, the metric is defined for the interior and the boundary of each disk, and is flat, but the result of the gluing (a flattened sphere) is not flat and has infinite curvature at the points that were on the boundaries of the two disks, so the metric is no longer flat at those points.

Can someone explain how the metric "changes" in the process of gluing. Was it, contrary to my assumption, somehow undefined on the boundary previously.

I think I am mssing something fundamental here...
You are confused: Topological 'gluing' together of two spaces which happen to have metrics does not automatically create a combined metric on the combined space.  You have to explicitly define the new metric from the old by stipulating how to compute the distance between a point in the interior of one disk from a point in the interior of the other (or create a fresh metric from scratch).

Incidentally, 'curvature' is not a property of the intrinsic metric; it is a property of how the space is embedded in a larger space with a metric of its own (example: the surface of a cylinder, with respect to the obvious geodesic metric, is not considered to be curved [the Gaussian curvature is zero]).
You are confused: Topological 'gluing' together of two spaces which happen to have metrics does not automatically create a combined metric on the combined space.  You have to explicitly define the new metric from the old by stipulating how to compute the distance between a point in the interior of one disk from a point in the interior of the other (or create a fresh metric from scratch).

Incidentally, 'curvature' is not a property of the intrinsic metric; it is a property of how the space is embedded in a larger space with a metric of its own (example: the surface of a cylinder, with respect to the obvious geodesic metric, is not considered to be curved [the Gaussian curvature is zero]).