In case you weren't aware, such pushouts with finite $f$ always exist in the wider context of algebraic spaces (with the input objects also permitted to be algebraic spaces) under some mild "finiteness" hypotheses (quasi-compact diagonals, being locally of finite type over some fixed reasonable noetherian base scheme, etc.). More importantly for actually *using* these things (beyond categorical garbage), their underlying topology is reasonably related back to the given input data and they have good behavior relative to flat base change. This all goes back to Artin (and even further back to Hironaka in some cases when the input objects are schemes, according to the Introduction to Donald Knutson's book *Algebraic Spaces*); a reference for a write-up of a proof of Artin's result is Theorem 2.2.2 in https://arxiv.org/pdf/0910.5008.pdf

You don't mention your reason for wanting various pushouts to exist as schemes (or if you want such to have some properties such as separatedness, etc.), but would existence as an algebraic space be sufficient for you? Artin's paper *Algebraization of formal moduli II* in Annals of Math vol. 91 (1970) gives some criteria in section 6 for existence of a pushout with proper $f$ (i.e., "contraction" of a closed subspace along a proper map) as an algebraic space, again with useful topological properties. This was extended in some ways by Joseph Mazur: see his paper *Conditions for the Existence of Contractions in the Category of Algebraic Spaces* in Transactions of the AMS, vol. 209 (1975) (the paper [10] mentioned in the middle of page 2 of that paper, which from its title must be a version of his PhD work under Artin, does not seem to have been published).

Coming back to schemes, here is an example in dimension 2 where a scheme pushout along a proper $f$ doesn't exist if we make a mild reasonable hypothesis on the pushout, without which it would be totally useless anyway (so avoiding the situation as in Jason Starr's example which exists as a scheme but that I am sure he would agree is so topologically bad as to be basically useless).

In the Introduction to Knutson's book mentioned above (see pp. 21-22) there is an example of a smooth projective surface $X$ over a big-enough algebraically closed field $k$ (he takes $k=\mathbf{C}$, but any field not algebraic over a finite field works there) and a smooth connected curve $Z \subset X$ (in fact an elliptic curve) for which one can make an integral proper algebraic space $P$ of dimension 2 and a (proper) surjection $q:X \rightarrow P$ that carries $Z$ onto a rational point $\xi \in P(k)$ such that $q^{-1}(\xi) = Z$ as closed subsets of $X$, $q$ is an isomorphism over $P - \{\xi\}$, and $P$ is *not* a scheme. (This construction rests on Cor. 6.10 in Artin's paper mentioned above.) In particular, $P$ is smooth away from $\xi$ (though it has to be non-smooth at $\xi$ because smooth proper algebraic spaces of dimension 2 are necessarily schemes; see the end of section 4 of Chapter V of Knutson's book).

By working over an etale scheme neighborhood of $(P, \xi)$ one sees that $f$ factors uniquely through the $P$-finite normalization of $P$, so we may replace $P$ by its normalization to arrange that $P$ is normal (if it wasn't already normal) without affecting any of the properties we have arranged. We have the closed immersion $i:Z \hookrightarrow X$ and proper surjection $f:Z \rightarrow {\rm{Spec}}(k) =: Y$ induced by $q:X \rightarrow P$. Let's see that the non-scheme algebraic space $P$ is a pushout of $Y \leftarrow Z \hookrightarrow X$ in the category of algebraic spaces and use this to deduce that the pushout does not exist in the category of schemes if we want the pushout to be at all reasonable.

By normality of $P$, one sees that $O_P = f_*(O_X)$. Thus, using that $f$ is a topological quotient map, if $P$ were a scheme then it would be the pushout in the category of locally ringed spaces (in particular, in the category of schemes). This reasoning does not use properness of $P$ over $k$, so it can be applied to the pullback of $f:X \rightarrow P$ over the members of an etale scheme cover of $P$ to deduce (via the reasoning we just did in the scheme setting and via the etale sheaf property of algebraic spaces) that $P$ is necessarily a pushout in the category of algebraic spaces.

Finally, we show there is no "reasonable/useful" pushout in the category of schemes. Suppose that $\pi:X \rightarrow Q$ is a scheme pushout, so $Q$ is canonically a $k$-scheme. By the pushout property of $P$ in the category of algebraic spaces there is a unique $k$-map $h:P \rightarrow Q$ such that $\pi = h \circ q$. Since $P$ is finite type over $k$, clearly $h$ is locally of finite type. We claim that $h$ is separated too. Indeed, in the factorization
$$P \rightarrow P \times_Q P \rightarrow P \times_{{\rm{Spec}}(k)} P$$
of the closed immersion $\Delta_{P/k}$, the second map is monic and hence separated, so the first map $\Delta_h$ is also a closed immersion.

We will now make the mild assumption that $\pi$ restricts to an open immersion on $X-Y$ ($Q$ would be useless if that didn't hold). Then $h$ is locally quasi-finite and separated, but an algebraic space that is locally quasi-finite and separated over a scheme is a scheme (see Tag 03XX in the Stacks Project for a proof in the ultimate generality, with no noetherian or other "finiteness" hypotheses on the scheme). Since $P$ is not a scheme, this is a contradiction and so such a $Q$ (with a mild hypothesis on $X \rightarrow Q$) doesn't exist.