As far as I know, the definition of a compact operator $T:E \to F$ usually requires that that both $E$ and $F$ are Banach spaces. The main reason is that if $(E, d)$ is a complete metric space. Then $F \subseteq E$ is relatively compact if and only if $F$ is totally bounded. This allows us to have several equivalent definitions for a compact operator $T:E \to F$ when $E$ and $F$ are Banach spaces:
- For each bounded set $B \subseteq F$, $T(B)$ is relatively compact in $F$.
- If $(\xi_n)_{n=1}^{\infty}$ is a bounded sequence in $E$, then $(T(\xi_n))_{n=1}^\infty$ admits a convergent subsequence in $F$.
- $T\Big(\overline{B_1^E(0)}\Big)$ is relatively compact in $F$.
- $T\Big(\overline{B_1^E(0)}\Big)$ is totally bounded.
I have never worked with compact operators between non-Banach spaces. One of the main reasons is that if $F$ is not Banach you lose definition 4 above. This definition is important because an immediate consequence is that any compact operator is bounded.
Let's take a look at how the proof of Schauder's Theorem actually uses the equivalent definitions 2 and 4 above and therefore it's implicitly assumed that $E$ and $F$ are Banach spaces.
Sketch of proof of Schauder's Theorem
$(\Rightarrow)$ To show that if $T$ is compact then $T^*$ is compact, one shows $T^*\Big(\overline{B_1^{F^*}(0)}\Big)$ is totally bounded using the fact that $T\Big(\overline{B_1^E(0)}\Big)$ is. This can be done by a clever $\varepsilon/3$ argument.
$(\Leftarrow)$ Conversely, if $T^*$ is compact we now know that $T^{**}$ is compact (same proof as above which again relies on definition 4 of compact operators). Now, recall that there is an isometric embedding map $\widehat{\cdot}: E \hookrightarrow E^{**}$ given by
$$
\widehat{\xi}(\varphi) := \varphi(\xi) \ \ \forall \xi \in E \ \forall \varphi \in E^*
$$
Now, we use definition 2 above: Let $(\xi_n)_{n=1}^\infty$ be a bounded sequence in $E$. Then, $(\widehat{\xi_n})_{n=1}^\infty$ is a bounded sequence in $E^{**}$. Since $T^{**}$ is compact, it follows that $(T^{**}(\widehat{\xi_n}))_{n=1}^{\infty}$ admits a convergent subsequence in $F^{**}$. Now notice that for any $\sigma \in F^*$, we have
$$
T^{**}(\widehat{\xi})(\sigma) = \widehat{\xi}(T^*(\sigma)) = \widehat{\xi}(\sigma \circ T) = \sigma(T(\xi))=\widehat{T(\xi)}(\sigma)
$$
That is, $T^{**}(\widehat{\xi})=\widehat{T(\xi)}$ and therefore $\|T^{**}(\widehat{\xi_n})\|=\|T(\xi_n)\|$, which implies that $(T(\xi_n))_{n=1}^\infty$ admits a convergent subsequence, so $T$ is in fact compact. $\blacksquare$