Why can we treat the path integral as an integral over a infinite dimensional vectorspace?

The path integral is usually introduced by integrating over all piecewise linear paths in discrete time and then taking the time step $$\varepsilon$$ to zero, i.e. $$\int Dx e^{iS[x]} \sim \int dx_1 dx_2 \dots \exp\left({i\sum_i\varepsilon L(\frac{x_i-x_{i-1}}{\varepsilon}, \frac{x_i+x_{i-1}}{2})}\right)$$

This intuitively results in an integral over all paths connecting two points. These paths don't need to be differentiable (also it is analogous to a stochastic process where the paths are not differentiable almost surely).

To use path integrals in QFT the intuitive understanding is different. Here we treat the path integral as a "standard" integral in $$\infty$$ dimensions. For example the free boson path integral $$\int D\phi \exp\left(i\int d^4x \phi\partial_\mu\partial^\mu\phi\right)$$ is the infinite dimensional limit of $$\int d^dx \exp\left({-\frac{1}{2}x^T A x}\right)$$ where $$A \to \partial_\mu\partial^\mu$$. This approach is useful to derive for example the propagator of this theory.

In the second approach the vector space over which is integrated is the space of all differentiable functions connecting two points (Otherwise one cannot treat $$\partial_\mu\partial^\mu$$ as a linear operator).

How does both approaches fit together? Is it clear that they lead to the same result? In particular why does the integration space differ (non differentiable vs. differentiable)?