We will use proof by contradiction to show that all $a_{1},...,a_{k}$ are $0$.
W.L.O.G we may assume $a_{k}$ is non-zero .
Let $d$ be the largest integer $\geq 0$ so that $p_{k}^{d}|a_{k}$.
Consider $$S(-d-1) = a_{k+1}+\sum_{j=1}^{k}a_{j}p_{j}^{-d-1}$$
Note that $S(-d-1)$ is of the form $\frac{u}{v}$ with $\gcd(u,v) = 1$,
$p_{k}|v$ and $p_{k}^2$ does not divide $v$. Also observe that $S(-d-1)$ is a quadratic residue modulo each prime $q$ where $q \neq p_{j}$ ($j = 1,...,k$) as if we choose $t \in \mathbb{N}$ so that $-d-1+(q-1)t \geq 1$ we have
$$S(-d-1)\equiv a_{k+1}+\sum_{j=1}^{k}a_{j}p_{j}^{-d-1} \equiv a_{k+1}+\sum_{j=1}^{k}a_{j}p_{j}^{-d-1+(q-1)t} \equiv S(-d-1+(q-1)t) \mod q$$
Since $S(-d-1+(q-1)t)$ is a square, $S(-d-1)$ is a square $\mod q$ by the above modular equation.
Thus if we show that $S(-d-1) =\frac{u}{v}$ is not a quadratic residue modulo some prime $q \neq p_{j}$ $(j = 1,...,k)$ we will have a contradiction. We will obtain this contradiction when we use the quadratic reciprocity theorem and Dirichlet's theorem of primes in arithmetic progressions. Let us continue the proof;
Note that by the above discussion we can perform prime factorization on the numerator and denominator of $S(-d-1)$
$$S(-d-1) = \frac{u}{v} = \frac{(\text{square})r}{(\text{square})sp_{k}}$$
where $r$ and $s$ are square-free and $p_{k}$ is coprime to all primes in the numerator and denominator with the exception of itself. By quadratic reciprocity theorem there exists $\alpha_{r},\alpha_{s},\alpha_{k}$ with $(\alpha_{r},r) = 1$, $(\alpha_{s},s) = 1$ and $(\alpha_{k},p_{k})=1$ so that if a prime $q$ which satisfies
$$q \equiv \alpha_{r} \mod r$$
$$q \equiv \alpha_{s} \mod s$$
$$q \equiv \alpha_{k} \mod k$$
$$q \equiv 1 \mod \frac{\prod_{j=1}^{k}p_{j}}{\gcd(rsp_{k},\prod_{j=1}^{k}p_{j})}$$
then $S(-d-1)$ is not a quadratic residue modulo $q$. But primes such as $q$ exist due to Chinese remainder theorem (we can solve the above congruence with solution $\alpha \mod \beta$ with $(\alpha,\beta) = 1$) and Dirichlet's theorem on primes in arithmetic progression. This is a contradiction as this would mean $S(-d-1+(q-1)t)$ is never a square whenever $t \in \mathbb{Z}$.