Q1: Yes. For affine schemes, the gluing construction you need is just the fiber product of rings. Because gluing two affines in this way produces an affine, you can glue two schemes and get a scheme by taking an affine cover of each.

Q2: Yes, and the proof is more or-less completely explicit. Choose a high enough $n$ such taht $\mathcal O(n H_i)$ is a projextive embedding of $X_i$ and $\mathcal I_{D_i} \otimes \mathcal O(n H_i)$ is globally generated with no higher cohomology, for both $i$.

Then in the embedding $X_i \to \mathbb P^{N_i}$, $D_i$ is contained in some linear subspace cut out by the functions in $H^0(X_i, \mathcal I_{D_i} \otimes \mathcal O(n H_i))$. Because they generate, in fact $D_i$ is the intersect of $X_i$ with that linear subspace. Because the map $H^0(X_i, \mathcal O(nH_i)) \to H^0(X_i, \mathcal O_{D_i} (nH_i))$ is surjective, the emedding of $D_i$ into that linear subspace is just the embedding coming from the very ample line bundle $nH_i$. This embedding is the same whether $i=1$ or $2$.

So $X_1$ and $X_2$ are expressed as two projective varieties with an isomorphism between their restrictions to two linear subspaces. We can easily embed the two projective spaces in a higher-dimensional projective space such that their intersection is exactly that linear subspace. Then the union of $X_1$ and $X_2$ in that higher space will clearly be $X_1 \cup_D X_2$, and hence it is a projective variety.