How to put custom admin setting field into a shortcode

Your issues aren’t shortcode-related, just some PHP syntax problems. I suggest enabling debugging so you can see PHP errors being generated.

Opening <?php and closing ?> php tags are for switching between html and php output. See escaping from html in PHP documentation.

A function can only return once, as it immediately ends execution and exits the function. See return in PHP docs.

It also couldn’t hurt to familiarize yourself with strings and the proper use of single and double quotes.

function shortcode()
{
    $input_examples = get_option('sandbox_theme_input_examples');
    return '<img src="' . sanitize_text_field( $input_examples[ 'textarea_example' ] ) . '">';
}
add_shortcode('shortcode', 'shortcode');