The answer is <b>Yes</b>.

Theorem. The following are equivalent for any Hausdorff
space $X$.

1. $X$ is compact.

2. $X^\kappa$ is Lindel&ouml;f for any cardinal
$\kappa$.

3. $X^{\omega_1}$ is Lindel&ouml;f.

Proof. The forward implications are easy, using Tychonoff
for 1 implies 2, since if $X$ is compact, then
$X^\kappa$ is compact and hence Lindel&ouml;f.

So suppose that we have a space $X$ that is not compact, but
$X^{\omega_1}$ is Lindel&ouml;f. It
follows that $X$ is Lindel&ouml;f. Thus, there is a countable
cover having no finite subcover. From this, we may
construct a strictly increasing sequence of open sets
$U_0 \subset U_1 \subset \dots U_n \dots$
with the union $\bigcup\lbrace U_n \; | \; n \in \omega \rbrace = X$.

For each $J \subset \omega_1$ of size $n$, let $U_J$ be
the set $\lbrace s \in X^{\omega_1} \; | \; s(\alpha) \in U_n$ for each $\alpha \in J \rbrace$. As the size of $J$ increases, the set $U_J$ allows more freedom on the
coordinates in $J$, but restricts more coordinates. If $J$ has
size $n$, let us call $U_J$ an open $n$-box, since it
restricts the sequences on $n$ coordinates. Let $F$ be the
family of all such $U_J$ for all finite $J \subset \omega_1$

This $F$ is a cover of $X^{\omega_1}$. To
see this, consider any point $s \in X^{\omega_1}$. For each $\alpha \in
\omega_1$, there is some $n$ with $s(\alpha) \in
U_n$. Since $\omega_1$ is uncountable,
there must be some value of $n$ that is repeated unboundedly
often, in particular, some $n$ occurs at least $n$ times. Let $J$
be the coordinates where this $n$ appears. Thus, $s$ is in
$U_J$. So $F$ is a cover.

Since $X^{\omega_1}$ is Lindel&ouml;f,
there must be a countable subcover $F_0$. Let $J^*$ be
the union of all the finite $J$ that appear in the
$U_J$ in this subcover. So $J^*$ is a countable subset
of $\omega_1$. Note that $J^*$ cannot be finite,
since then the sizes of the $J$ appearing in $F_0$
would be bounded and it could not cover
$X^{\omega_1}$. We may rearrange indices
and assume without loss of generality that $J^*=\omega$ is
the first $\omega$ many coordinates. So $F_0$ is
really a cover of $X^\omega$, by ignoring the
other coordinates.

But this is impossible. Define a sequence $s \in
X^{\omega_1}$ by choosing $s(n)$ to be
outside $U_{n+1}$, and otherwise arbitrary. Note that
$s$ is in $U_n$ in fewer than $n$ coordinates below
$\omega$, and so $s$ is not in any $n$-box with $J \subset \omega$, since any such box has $n$ values in $U_n$.
Thus, $s$ is not in any set in $F_0$, so it is not a
cover. QED

In particular, to answer the question at the end, it suffices to take any uncountable $\kappa$.