Is it possible to have a spacetime described by a piecewise metric? For example (in $1+1D$):
$$
ds^2 = 
\begin{cases}
        -dt^2 + dx^2 & \text{if } x > 0\\
        -dt^2 + Adx^2 & \text{if } x \leq 0 \text{ and } A \neq 1
    \end{cases}
$$
What criteria/junction conditions are necessary for the above metric to be a valid description of a spacetime?  What does the inverse metric look like?
 A: You're definitely free to consider whatever you like. Here, you considered a discontinuous $(0,2)$ tensor field on the manifold $\Bbb{R}^2$, so there's probably nothing much you can say about how this relates to physics. Now, you could instead consider a smooth metric tensor $g=-dt^2+\zeta\,dx^2$, where $\zeta:\Bbb{R}\to\Bbb{R}$ is a smooth function such that $\zeta=1$ for $x>0$ and say $\zeta$ is some other positive constant $A$ for $x<-1$ (so $\zeta$ smoothly changes from a positive constant $A$ to $1$ in the region $\{x\,: -1\leq x\leq 0\}$). You can now define a symmetric tensor field $T_{ab}=\frac{1}{8\pi}(R_{ab}-\frac{1}{2}g_{ab}R)$ and say that for this specific 'stress energy tensor', the metric $g$ is a smooth solution of Einstein's equations. This is nice and smooth but the question still remains as to whether this describes anything physical, and most likely it doesn't.
One of the ways to talk about 'good' spacetimes is through the initial value formulation (see Hawking and Ellis or Wald for more info about everything I'm about to say); and a key idea here is global hyperbolicity. Note that Einstein's field equations
\begin{align}
R_{ab}-\frac{1}{2}g_{ab}R &=8\pi T_{ab}
\end{align}
as written are pretty hard to interpret, and a-priori, it isn't even clear what a solution means. This is typical for any type of PDE; one has to carefully define what is meant by a solution. One should think of a solution as starting from some 'initial data', and 'evolving' them according to the field equations. In this manner, the theory is dynamical, and that is how we make sense of it.
For example, in electrodynamics, we solve for the $E$ and $B$ fields, and we have the Maxwell equations
\begin{align}
\begin{cases}
\frac{\partial \boldsymbol{B}}{\partial t} &= -\nabla\times\boldsymbol{E}\\
\frac{\partial \boldsymbol{E}}{\partial t} &= \frac{1}{\epsilon_0\mu_0}\nabla\times\boldsymbol{B}- \frac{1}{\epsilon_0}\boldsymbol{J}\\
\nabla\cdot \boldsymbol{E}&= \frac{\rho}{\epsilon_0}\\
\nabla\cdot \boldsymbol{B}&= 0
\end{cases}
\end{align}
I re-organized the equations to highlight that we have two equations which talk about time derivatives (i.e evolution), and two equations which are 'constraints'. Note that solutions to PDEs must talk about initial/boundary conditions. In other words, in $\Bbb{R}^4$ with coordinates $(t,x,y,z)$, we may consider the initial time hypersurface $\Sigma_0=\{(t,x,y,z)\,:\, t=0\}$, and on this initial time surface, we imagine that we have some initial electric and magnetic fields $\boldsymbol{E}_0,\boldsymbol{B}_0$, and initial charge and current densities $\rho_0,\boldsymbol{J}_0$ (all defined on $\Sigma_0$), such that the latter two constraints are satisfied on $\Sigma_0$. Depending on context, we may also have to provide boundary conditions. The idea is then that we start with this 'initial data', and then 'let time flow', and solve the equations in time to see how the fields evolve. That is what we mean by solutions to Maxwell's equations (granted there's a lot more to be said and I'm glossing over a ton of details, regarding the potential formulation, gauge freedom etc, but that's the gist).
For Einstein's equations, we should think in similar terms. We should think of starting with some initial data, and then consider globally hyperbolic maximal development of the initial data. For Einstein's equations, the initial data consists of $(\Sigma,\gamma_{ab}, \kappa_{ab})$, where $\Sigma$ is a $3$-manifold, $\gamma_{ab}$ is a Riemannian metric on $\Sigma$, and $\kappa_{ab}$ is a certain symmetric tensor field (it will turn out to be the second fundamental form/ extrinsic curvature later); and of course any other 'reasonable' matter fields you wish to consider (and appropriate constraint equations have to be satisfied, just as in the case of electrodynamics). Of course one has to specify which function spaces (usually some Sobolev space) these tensor fields belong to, and we have to ensure that these initial data are 'physically reasonable' (whatever that means, must be made precise based on context). We then take this initial data, and 'evolve' it according to Einstein's equations. The result is a globally hyperbolic spacetime $(M,g)$, which satisfies Einstein's field equations, and it is usually only spacetimes which arise in this fashion to which we ascribe any significant physical meaning. For example, Minkowski spacetime, Schwarzschild, Kerr etc can all be thought of as arising in this manner.

Obligatory Remark:
I've barely begun to even scratch the surface here, you should read Hawking and Ellis/Wald for more detailed information (and there's a vast literature on this stuff).
