I believe that anyone who can answer this question knows the terminology, but $\beta\omega$ is the Čech-Stone compactification of the integers and a point $p$ is a weak P-point in a space $X$ iff it is not in the closure of any countable subset of $X-\{p\}$. I admit to lacking intuition with $\beta\omega$ and maybe this question has a trivial answer, apologies if it is the case.

My motivation is the following. I want to find a countably compact space $X$ and a surjective map $f:X\to[0,1]$ such that $f(C)\not=[0,1]$ if $C\subset X$ is compact. There might be a simple example that escaped me, but if the question in the title has a positive answer, taking $X$ to be $\beta\omega$ minus its weak P-points yields such a space:

-It is countably compact because $\beta\omega$ is compact, hence any countable subset has a cluster point which cannot be a weak P-point,

-It maps onto $[0,1]$ because we may map $\omega$ onto the rational numbers in $[0,1]$ and extend the function to all of $\beta\omega$. The image of $X$ is countably compact, hence compact in $[0,1]$ and is thus all of $[0,1]$.

-If $f(E)=[0,1]$ with $E\subset X$, $E$ has cardinality $\mathfrak{c}$ and its closure non-compact.

But maybe I am trying to kill a mosquito with an atomic bomb and a much simpler example exists.

alwaysnon-compact, because every infinite closed subset of $\beta \omega$ has cardinality $>\!\mathfrak{c}$ (more precisely, it has cardinality $2^\mathfrak{c}$, and it even contains a topological copy of $\beta \omega$). $\endgroup$ – Will Brian May 6 '18 at 14:04