(We observe that $X$ is separated and finite type as a locally closed subscheme of a projective space.) Let us use the notation introduced above the statement of the lemma. We consider the projections $$ \xymatrix{ \mathbf{A}^r_k \times_k X \ar[d] & H_{univ} \ar[l] \ar[ld]^p \ar[r] \ar[rd]_q & \mathbf{A}^r_k \times_k X \ar[d] \\ X & & \mathbf{A}^r_k } $$ Let $\Sigma \subset H_{univ}$ be the singular locus of the morphsm $q : H_{univ} \to \mathbf{A}^r_k$, i.e., the set of points where $q$ is not smooth. Then $\Sigma$ is closed because the smooth locus of a morphism is open by definition. Since the fibre of a smooth morphism is smooth, it suffices to prove $q(\Sigma)$ is contained in a proper closed subset of $\mathbf{A}^r_k$. Since $\Sigma$ (with reduced induced scheme structure) is a finite type scheme over $k$ it suffices to prove $\dim(\Sigma) < r$ This follows from Lemma \ref{lemma-dimension-fibres-locally-algebraic}. Since dimensions aren't changed by replacing $k$ by a bigger field (Morphisms, Lemma \ref{morphisms-lemma-dimension-fibre-after-base-change}), we may and do assume $k$ is algebraically closed. By dimension theory (Lemma \ref{lemma-dimension-fibres-locally-algebraic}), it suffices to prove that for $x \in X \setminus Z$ closed we have $p^{-1}(\{x\}) \cap \Sigma$ has dimension $< r - \dim(X')$ where $X'$ is the unique irreducible component of $X$ containing $x$. As $X$ is smooth over $k$ and $x$ is a closed point we have $\dim(X') = \dim \mathfrak m_x/\mathfrak m_x^2$ (Morphisms, Lemma \ref{morphisms-lemma-smooth-omega-finite-locally-free} and Algebra, Lemma \ref{algebra-lemma-rank-omega}). Thus we win if $$ \dim p^{-1}(x) \cap \Sigma < r - \dim \mathfrak m_x/\mathfrak m_x^2 $$ for all $x \in X$ closed. \medskip\noindent Since $V$ globally generated $\mathcal{L}$, for every irreducible component $X'$ of $X$ there is a nonempty Zariski open of $\mathbf{A}^r$ such that the fibres of $q$ over this open do not contain $X'$. (For example, if $x' \in X'$ is a closed point, then we can take the open corresponding to those vectors $v \in V$ such that $\psi(v)$ does not vanish at $x'$. This open will be the complement of a hyperplane in $\mathbf{A}^r_k$.) Let $U \subset \mathbf{A}^r$ be the (nonempty) intersection of these opens. Then the fibres of $q^{-1}(U) \to U$ are effective Cartier divisors on the fibres of $U \times_k X \to U$ (because a nonvanishing section of an invertible module on an integral scheme is a regular section). Hence the morphism $q^{-1}(U) \to U$ is flat by Divisors, Lemma \ref{divisors-lemma-fibre-Cartier}. Thus for $x \in X$ closed and $v \in V = \mathbf{A}^r_k(k)$, if $(x, v) \in H_{univ}$, i.e., if $x \in H_v$ then $q$ is smooth at $(x, v)$ if and only if the fibre $H_v$ is smooth at $x$, see Morphisms, Lemma \ref{morphisms-lemma-smooth-at-point}. \medskip\noindent Consider the image $\psi(v)_x$ in the stalk $\mathcal{L}_x$ of the section corresponding to $v \in V$. We have $$ x \in H_v \Leftrightarrow \psi(v)_x \in \mathfrak m_x\mathcal{L}_x $$ If this is true, then we have $$ H_v\text{ singular at }x \Leftrightarrow \psi(v)_x \in \mathfrak m_x^2\mathcal{L}_x $$ Namely, $\psi(v)_x$ is not contained in $\mathfrak m_x^2\mathcal{L}_x$ $\Leftrightarrow$ the local equation for $H_v \subset X$ at $x$ is not contained in $\mathfrak m_x^2$ $\Leftrightarrow$ $\mathcal{O}_{H_v, x}$ is regular (Algebra, Lemma \ref{algebra-lemma-regular-ring-CM}) $\Leftrightarrow$ $H_v$ is smooth at $x$ over $k$ (Algebra, Lemma \ref{algebra-lemma-separable-smooth}). We conclude that the closed points of $p^{-1}(x) \cap \Sigma$ correspond to those $v \in V$ such that $\psi(v)_x \in \mathfrak m_x^2\mathcal{L}_x$. However, as $\varphi_{\mathcal{L}, \psi}$ is an immersion the map $$ V \longrightarrow \mathcal{L}_x/\mathfrak m_x^2\mathcal{L}_x $$ is surjective (small detail omitted). By the above, the closed points of the locus $p^{-1}(x) \cap \Sigma$ viewed as a subspace of $V$ is the kernel of this map and hence has dimension $r - \dim \mathfrak m_x/\mathfrak m_x^2 - 1$ as desired.