Filtering posts by custom field value not working

Your 'meta_query' value is wrong – it should be:

'meta_query' => array(
    array(
        'key'     => 'city',
        'value'   => $location,
        'compare' => '=',
    )
);

Anyway, you don’t need to use 'meta_query' in this case where you have to filter by just one meta field… So for a little more optimized code, try replacing your $args with the following:

$args = array(
    'post_type' => 'location',
    'tax_query' => array(
        array(
            'taxonomy' => 'specialties',
            'field'    => 'slug',
            'terms'    => $specialty,
        )
    ),
    'meta_key'  => 'city',
    'meta_value'=> $location,
);