For whatever reason, it seems that the PHP is not being executed inside the shortcode. I was able to resolve this using the WordPress PHP function: <?php echo do_shortcode("[shortcode]"); ?> resulting in something like this, which does work:
<?php $pdf = get_field( 'pdf' ); ?>
<li>URL: <?php echo esc_url( $pdf['url'] ) ?></li>
<li>ID: <?php echo esc_html( $pdf['id'] ) ?></li>
<?php $pdfshort="[pdfjs-viewer url=\"" . esc_url( $pdf['url']) . "\" attachment_id=\"" . esc_html( $pdf['id']) . "\" viewer_width=100% viewer_height=800px fullscreen=true download=true print=true]" ?>
<li>PDF: <?php echo $pdfshort ?></li>
Embed:
<?php echo do_shortcode("$pdfshort"); ?>
Note the use of \” to escape the quotes in the shortcode; using " did not work.