I can't completely follow your construction, I think the details aren't correct, but the general idea is.
Assume we have an automaton for $L_2$ with start state $q_0$ and halting states $F$.
Let $S$ be the set of states that can be reached starting from $q_0$ with a word in $L_1$.
Let $F'$ be the set of states from which a halting state can be reached with a word in $L_1$.
Note that these are well-defined sets, no matter how $L_1$ is given. The worst that could happen is that we can't compute them, but we only care about their existence.
Now an automaton accepting the substring language can be given by modifying the automaton for $L_2$. We add one new state $q_{00}$ and $\varepsilon$-transitions from it to every state in $S$. We let $q_{00}$ be the new start state, and $F'$ the new set of halting states.
If this automaton accepts a word $w$, it first uses one $\varepsilon$-transition corresponing to a word $x\in L_1$, then uses the same transitions as the old automaton would have used, ending in a state in $F'$ for which there exists a word $y\in L_1$ that leads to a state in $F$. So the word $xwy$ is accepted by the old automaton, so it belongs to $L_2$, so $w$ indeed belongs to the substring language.
For the other direction, let $w$ belong to the substring language, so there are $x,y\in L_1$ such that $xwy\in L_2$. The state the old automaton reaches from $q_0$ with input $x$ is in $S$, so the new automaton has an $\varepsilon$-transition to it from its starting state. From this state, both automata reach the same state $q$ with input $w$. Since $xwy\in L_2$, the old automaton reaches a state in $F$ from $q$ with input $y$, so that $q\in F'$ and $w$ is accepted by the new automaton.
So the new automaton accepts the substring language, which is therefore regular.