How do I specify a proxy for a custom 404 page?
I’m not sure what you mean by proxy, but if you need a simple redirect to custom 404 page, you can do it like mentioned here: Redirect options | Netlify Docs
How does 404 page shadowing work in netlify?
The link I mentioned answers the question. Have you tried it already?