Topological spaces in which every proper closed subset is compact
Assume that $X$ is not compact. Then there is a family $\{A_i\}_i$ of closed subsets with the finite intersection property such that $\bigcap_i A_i = \emptyset$. Thus, there exists an $j$ with $A_j \neq X$. Then $A_j$ is a proper closed subset of $X$ but it is not compact, since the family $\{A_i \cap A_j \}_i$ has the finite intersection property and $\bigcap (A_j \cap A_i) = \emptyset$.
I think that the most interesting examples of this are infinite topological spaces $X$ such that every proper closed subset is finite. Such a space trivially has the property you mention, but is compact for less trivial reasons.
One nice example is $X=\mathbb{N}$, with the nonempty open sets $U_n = \{k \mid k\geq n\}$.
Note that this space is an inverse limit of finite topological spaces. In general, an inverse limit of finite topological spaces is compact.
Here is another nice example! Let $R$ be a commutative ring with unity, and $I\subset R$ an ideal. For simplicity, assume that $R$ is reduced. Consider the topological space $X = \operatorname{Spec} R \setminus V(I)$ of prime ideals of $R$ not containing $I$.
Suppose that every proper closed subspace of $X$ is compact. This is equivalent to the condition that $V(J)\setminus V(I)$ is compact for each ideal $J$ with $IJ\neq 0$.
Unraveling this, our condition is that $\overline{I}$ is finitely generated in $R/J$ for all ideals $J$ with $IJ\neq 0$. And the conclusion is that $I$ is itself finitely generated.
Indeed, we can take any nonzero $x\in I$. Then $I\cdot(x)\neq 0$, and if $\overline{I}$ is finitely generated in $R/(x)$, we can lift generators to $R$, and throw in $x$ to get a set of generators for $I$.