Let $Y\subseteq X\subsetneq\mathbb{P}^{N}$ be smooth projective varieties, and let $$ S_{X,Y}=\overline{\{(x,y,z)\in X\times Y\times \mathbb{P}^{N}:x\neq y, z\in\langle x,y\rangle\}}. $$ Can we deduce the smoothness of $S_{X,Y}$ from the smoothness of $X,Y$?
I don't know theorems about the behaviour of smoothness under morphisms, but it could be easy if we knew any, via considering the projection $$ S_{X,Y}\rightarrow X\times Y. $$ (Notice that the fiber of every $p=(x,y)\in X\times Y$ such that $x\neq y$ is a line, and the fiber of the points $p=(y,y)\in X\times Y$ is isomorphic to $T_{y}X$).