If you use the submitblock RPC with a large enough block you'll run into "argument list too long". Using a pipe should fix this, at least on Linux / macOS.
The submitblock RPC can be useful to check validity of a stale block that never made it into the main chain (and that your node never fetched): call invalidateblock on its same-height-sibling and then feed it the raw block.
Easiest workaround is to use a library that connects directly to bitcoind via RPC (be careful to avoid a line break character at the end). Using the GUI console fails with "Block decode failed" for me, but haven't tested that extensively.