This is an error from the bash command line or operating system stating that the length of the command you entered is too long, presumably because $PDFHEX contains a long hexadecimal string. For reference:
https://stackoverflow.com/questions/19354870/bash-command-line-and-input-limit
The multichain-cli executable does not yet support an 'input parameter from file' mode, so for this kind of case I'm afraid you will need to access MultiChain JSON-RPC API more directly, rather than from multichain-cli. For example you can build the JSON request in a file then use curl to HTTP POST that file to the API.