Here I compared below conditions,
The value of the _size field must be less than or equal to 5000. The value of the _size_to field must be greater than or equal to 1000.
_size <= 1000
_size_to >= 5000
<?php
$filter_size_rang_min_val = 1000;
$filter_size_rang_max_val = 5000;
$meta_query = array(
'relation' => 'AND',
array(
'key' => '_size',
'value' => $filter_size_rang_max_val,
'type' => 'NUMERIC',
'compare' => '<='
),
array(
'key' => '_size_to',
'value' => $filter_size_rang_min_val,
'type' => 'NUMERIC',
'compare' => '>='
),
);
Please let me know if it works.