Let $L_1,L_2$ be two irreducible component of two different Hilbert schemes parametrizing closed subscheme in $\mathbb{P}^n$ and $\mathbb{P}^{n-1}$, respectively. Denote by $\pi_1: \mathcal{X}_1 \to L_1,\pi_2: \mathcal{X}_2 \to L_2$ the corresponding universal families of closed subschemes. Assume that there exists a hyperplane in $\mathbb{P}^n$, say $H$ and an open set $U$ in $L_1$ such that for all $u \in U$, $\pi_1^{-1}(u)$ intersect $H$ transversally and the intersection $\pi_1^{-1}(u).H$ is a fiber of $\pi_2$. Hence gives a set theoretic map from $U$ to $L_2$. The question is whether this induces a morphism of schemes (from $U$ to $L_2$)? If not, is it known under what conditions this could hold true?
Note that the intersection $\pi_1^{-1}(u).H$ gives only a subscheme in $\mathbb{P}^n$ but there is a natural identification of this with a subscheme in $\mathbb{P}^{n-1}$ obtained by the fibered product $\mathbb{P}^{n-1} \times_{\mathbb{P}^n} \pi_1^{-1}(u)$, where the morphism from $\mathbb{P}^{n-1}$ to $\mathbb{P}^n$ is a closed immersion induced by the vanishing of $H$.
EDIT: Assume if necessary that $U, L_2$ are smooth.