First some motivation.
Consider $\mathbb{R}^n-\{0\}$. This is simply connected iff $n > 2$, since it deformation retracts to $S^{n-1}$. If instead we consider $\mathbb{R}^n - L$ where $L$ is a line, we can factor it as $\mathbb{R}\times(\mathbb{R}^{n-1} - \{0\})$, so this is simply connected iff $n > 3$, using the previous result. With induction it is obtained that $\mathbb{R}^n - V$ where $V$ is a linear subspace is simply connected iff $\dim V < n -2$.
It easy easy to generalize at least the case with lines. If we from $\mathbb R^n$ remove $k$ lines through the origin, the space deformation retracts to $S^{n-1} - C$ where $C$ is a set of $2k$ points, by stereographic projection from any of those points we get a homeomorphism to $\mathbb{R}^{n-1} - C'$, which is simply connected iff $n > 3$. One would conjecture that removing $k$ distinct $r$-planes from $\mathbb R^n$ would result in a simply connected space for $n > r + 2$, and so on.
I was not able to come up with a simple proof for this other than for $k = 2$ (deformation retract to $S^{n-1}$ with 2 distinct great circles removed, they must intersect in a point, project stereographically from that point, we get $\mathbb R^{n-1}$ with 2 lines removed.)
In fact a vastly more general result is true: If $M$ is an $n$-dimensional smooth manifold and $X$ is a union of finitely many embedded submanifolds of $M$, all with codimension at least $k$, $\pi_i(M) \cong \pi_i(M - X)$ for $i < k-1$. The proof is fairly straightforward but somewhat of a sledgehammer:
Taking homotopy groups is a functor, so consider the inclusion map $\iota : M - X \to X$ and $\iota^*_i = \pi_i(\iota)$. If $f$ is a map $S^i \to M$, then $f$ is homotopic to $\tilde{f}$ which is transverse to $X$. If $i + (n-k) < n$, this means that $X$ and the image of $\tilde f$ are disjoint, so $[f] = [\tilde f]$ is in the image of $\iota^*_i$, so it is surjective. If $[f] = 1$, there is a map $g : D^{i+1} \to M$ such that $g|_{\partial D^{i+1}}= f$. But then if $i+1 + (n-k) < n$, we have that $g$ is homotopic to $\tilde g$ the image of which is disjoint from $X$. So if $\iota^*_i$ maps a homotopy class to something null-homotopic in $M$, that homotopy class is actually null-homotopic in $M-X$, that is, the kernel of $\iota^*_i$ is trivial, and we are done.
So my question is: is there a name for this result, which I imagine is well known, and is there a textbook reference for it? I learned this proof from On Braid Groups by Joan S. Birman, but I feel like there should be a reference in a more general work like a textbook, and there should be a name for it, too.
I am also curious if there is a more "pedestrian" proof for my original context of removing linear subspaces from $\mathbb R^n$. Since manifolds can be pretty general the need to use sledgehammers in the most general case makes sense, but for nice linear spaces one could hope that more basic machinery would suffice.
Your ogicinal result can be proved by a simple argument involving transversality (which is the same argument used for the general case, I guess)
First check that the fundamental homotopy group of a manifold can be computed using only smooth paths and smooth homotopies. Then check that every smooth path is homotopic to one which avoids your union of subspaces of codimension at least $2$, and that homotopies can be moved away from such a union of codimension at least $3$.