Complementing Douglas Zare's answer, for $k=3$ see the responses [here][1].

Regarding the case of $k=2$, the number of representations $r_2(n)$ as a sum of two squares is often zero (so there is no lower bound), but it behaves much like $d_2(n)$. Indeed, superficially the first quantity counts the number of representations $n=a^2+b^2$, while the second quantity counts the number of representations $n=ab$. At a deeper level, $r_2(n)$ equals $4\sum_{d\mid n}\chi(n)$, where $\chi$ is the nontrivial Dirichlet character modulo $4$, while $d_2(n)$ equals $\sum_{d\mid n} 1$ by definition. At any rate, the large values of $r_2(n)$ are much the same as those of $d_2(n)$, i.e. these functions have similar maximal order etc. (For $r_2(n)$ the largest values are produced by the products $n=q_1q_2\dots q_k$, where $q_1<q_2<\dots$ is the sequence of primes congruent to $1$ modulo $4$.)


  [1]: https://mathoverflow.net/questions/217698/many-representations-as-a-sum-of-three-squares