Is there a known way to construct flat families of smooth curves $\mathcal{C}/\mathcal{B}$ which are fiberwise embedded in a family of projective varieties $\mathcal{X}/\mathcal{B}$ and which have general moduli (i.e., the forgetful map $\mathcal{C} \to \mathcal{M}_g$ which discards the embedding and takes every curve to its isomorphism type is dominant)?
When we take all fibers of $\mathcal{X}$ to be projective spaces this can be done by Brill-Noether theory. I'm looking for alternative constructions which either don't use Brill-Noether, or consider different target spaces.