Let $\mathbb{Z}$ denote the set of all integers. Find all polynomials $P(x)$ with integer coefficients that satisfy the following property:

For any infinite sequence $a_1$, $a_2$, $\dotsc$ of integers in which each integer in $\mathbb{Z}$ appears exactly once, there exist indices $i < j$ and an integer $k$ such that $a_i +a_{i+1} +\dotsb +a_j = P(k)$.
1. **Identify the problem and the given conditions:**
   We need to find all polynomials \( P(x) \) with integer coefficients such that for any infinite sequence \( a_1, a_2, \dotsc \) of integers, where each integer in \( \mathbb{Z} \) appears exactly once, there exist indices \( i < j \) and an integer \( k \) such that \( a_i + a_{i+1} + \dotsb + a_j = P(k) \).

2. **Consider the case where \( P(x) \) is a linear polynomial:**
   Suppose \( P(x) = ax + b \). We need to show that for any sequence \( a_1, a_2, \dotsc \), there exist indices \( i < j \) such that the sum of the sequence from \( a_i \) to \( a_j \) equals \( P(k) \) for some integer \( k \).

3. **Define the partial sums:**
   Let \( S_k = a_1 + a_2 + \cdots + a_k \). We need to find \( i \) and \( j \) such that \( S_j - S_{i-1} = P(k) \).

4. **Consider the residues modulo \( a \):**
   Since \( P(x) = ax + b \), we need \( S_j - S_{i-1} \equiv b \pmod{a} \). Consider the sequence of partial sums \( S_1, S_2, \dotsc \). Since there are only \( a \) possible residues modulo \( a \), by the pigeonhole principle, there must be two indices \( i \) and \( j \) such that \( S_i \equiv S_j \pmod{a} \).

5. **Find the difference:**
   If \( S_i \equiv S_j \pmod{a} \), then \( S_j - S_i \equiv 0 \pmod{a} \). Therefore, \( S_j - S_i = ma \) for some integer \( m \). We need \( S_j - S_i = ax + b \) for some integer \( x \), which implies \( ma = ax + b \).

6. **Solve for \( x \):**
   Since \( ma = ax + b \), we have \( a(m - x) = b \). This equation has integer solutions for \( x \) if and only if \( b \) is divisible by \( a \). If \( b \) is not divisible by \( a \), then there is no solution. However, if \( b \) is divisible by \( a \), then \( x = m - \frac{b}{a} \) is an integer.

7. **Conclusion for linear polynomials:**
   Therefore, if \( P(x) = ax + b \) where \( b \) is divisible by \( a \), then there exist indices \( i < j \) such that \( a_i + a_{i+1} + \dotsb + a_j = P(k) \) for some integer \( k \).

8. **Consider the case where \( P(x) \) is a polynomial of degree greater than 1:**
   Suppose \( P(x) \) has degree greater than 1. We will construct a sequence \( a_1, a_2, \dotsc \) such that no partial sum is in the range of \( P \).

9. **Construct the sequence:**
   Suppose we have added \( a_1, a_2, \cdots, a_k \) so far. Let \( m \) be the number with the smallest absolute value that has not been added into the sequence yet. We commit to adding \( m \) as \( a_{k+2} \) and wish to choose a suitable \( a_{k+1} \).

10. **Avoid values in the range of \( P \):**
    There are \( 2k+1 \) values \( v \) such that \( a_{k+1} + v \) must not be in the range of \( P \). Let these \( 2k+1 \) values be inside an interval \( [a, b] \). We need to find a consecutive set of \( b-a \) numbers not in the range of \( P \). Since \( P \) has degree \( \ge 2 \), we can indeed do this, and we have infinite choices, so \( a_{k+1} \) can be chosen distinct from the previous ones.

11. **Conclusion for polynomials of degree greater than 1:**
    Therefore, if \( P(x) \) has degree greater than 1, we can construct a sequence such that no partial sum is in the range of \( P \).

12. **Consider the case where \( P(x) \) is a constant polynomial:**
    If \( P(x) \) is constant, say \( P(x) = c \), we can alternate between a big term and a small term, which clearly works.

The final answer is all linear polynomials \( \boxed{ P(x) = ax + b } \) where \( b \) is divisible by \( a \).