Short answer (assuming proper time-ordering of $x$ and $y$):
$$
\langle \Omega| \phi(x) \phi(y) | \Omega\rangle =
\frac{
\langle 0 |
U(-\infty, x^0) \phi_I(x) U(x^0, y^0)
\phi_I(y) U(y^0, +\infty)
|0 \rangle
}{\langle 0 | U(-\infty, \infty) | 0 \rangle }
$$
These infinities has to be in the action integral too.
Now there is a rather deep reason for having time going to infinity in the path integral (the credit for this goes to Weinberg and his awesome book, as usual). The propagators usually has funny $i \epsilon$ in denominators, like:
$$
\frac{1}{q^2 + m^2 - i \epsilon}
$$
Which makes possible integration over $q$ and helps select proper pole with Residue theorem.
Although it is usually just assumed and omitted in calculation, this $i \epsilon$ comes from the phases of field at time $\pm \infty$:
$$
\langle \Omega,out| \phi(\infty) \rangle \langle \phi(-\infty) | \Omega, in \rangle \propto e^{\epsilon \, \times \, \cdots \text{pairs of fields} }
$$
for some infinitesimal $\epsilon$.
(Note that in interacting theory it is possible to calculate this product of projections only at $t = \pm \infty$, because it is assumed that the theory is free at this time.)
Given that this product is proportional to the exponential form - the product of $\epsilon$ and pairs of fields will be merged with the action! This is the reason to have $\epsilon$ in the propagator.
(You may find more details in Chapter 9 of Weinberg's QFT Volume 1)