There is a fairly common example of a 2nd order formula that is only true in a universe with infinite domain:
$$\begin{align} \exists R \quad & \forall x && \lnot xRx \\ \land & \forall x \exists y && x R y \\ \land & \forall x \forall y && x R y \implies \lnot y R x \\ \land & \forall x \forall y \forall z && x R y \land y R z \implies x R z \\ \end{align}$$
And it is fairly easy to establish a formula that is only true in a finite universe:
$$\exists x \forall y~ x = y$$
which has only 1 element in the universe, or
$$\exists x_1 \exists x_2 \forall y ~x_1 = y \lor x_2 = y$$
which has no more than 2 elements in the universe. Is there a formula that only holds when the universe is finite without putting an upper finite limit on its size? In other words, it would be consistent with any formula of the form $\exists x_1 \dots \exists x_n \forall y ~ x_1 = y \lor \dots \lor x_n = y$ ? I would be interested even if the formula was a higher order (quantified over relations or functions) formula; however, I am mostly interested in formulas with no free variables and no unquantified constants.
The logical predicate $S$ forms a "finite system" if and only if:
$$\begin{array} {rl} % \forall F ~:~ & \left(\begin{array} {rrrl} % & \forall a,~ b ~:~ & F(a,~ b) & \implies S(a) \land S(b) \\ \land & \forall a ~:~ & S(a) & \implies \exists b ~:~ (S(b) \land F(a,~ b)) \\ \land & \forall a,~ b,~ c ~:~ & F(a,~ b) \land F(a,~ c) & \implies b=c \\ \land & \forall a,~ b,~ c ~:~ & F(a,~ b) \land F(c,~ b) & \implies a=c \\ \implies & \forall a ~:~ & S(a) & \implies \exists b ~:~ (S(b) \land F(b,~ a)) \\ % \end{array}\right)\end{array}$$
You might think of this as the second-order predicate logic version of Dedekind finite, with $F$ being a kind of "mapping" from $S$ to $S$.