Excluding a media query from specific pages

There’s nothing like that with media queries. You need to include the exclusion in your CSS selectors, like this:

body:not(.home) .site-header {
    // etc.
}

Alternatively, if this is the only CSS in a particular file, you could just not enqueue it on the homepage:

add_action(
    'wp_enqueue_scripts',
    function() {
        if ( ! is_front_page() ) {
            wp_enqueue_style( 'my-stylesheet', '/url/to/stylesheet.css' );
        }
    }
);