This can be solved with an integer linear program (although I'm not sure that's the best approach). Let $D$ be the smallest rectangle containing all your individual domains. We'll set up a MIP model to cover the gaps in $D.$ Once you have that answer, you can add four unbounded rectangles (all points above $D$, all points below $D$, all points left of $D$ but not above or below, and all points right of $D$ but not above or below) and have a full answer.
To cover $D,$ weWe first create a grid by running horizontal and vertical lines through all corners of your various domains. We don't need the grid to be evenly spaced. We also need to enclose the overall region in a box (hyperrectangle) big enough that all the vertices of the function domains are in the interior of the box. (We will relax the box later.) We need grid lines along the edges of the box.
I'll refer to any rectanglehyperrectangle bounded by consecutive grid lines both vertically and horizontallyin all directions as a "cell". We record the center points of each cell for future use, discarding any that are inside function domains.
Next, for every pair ofwe form all possible hyperrectangles whose vertices are grid points not on the same horizontal or vertical line we create a rectangle where one point is the lower left corner and the other is the upper right corner. Discard any rectanglehyperrectangle that overlaps one of the function domains. This is easy to determine: either the left edge. If, in any dimension, both limits of the rectangle is to the right ofhyperrectangle are on the right edgesame side of the domain (or vice versa),both less than or the top edge ofequal to the rectangle is belowlower range limit for that variable, or both greater than or equal to the bottom edge ofupper range limit), the domain (or vice versa)and the hyperrectangle do not overlap. Otherwise, or they overlapdo.
Enumerate the surviving rectangleshyperrectangles as $R_1,\dots,R_N.$ Compute the set $S$ of pairs $(i,j),\, i<j$ for which $R_i$ and $R_j$ overlap (using the same logic by which we decided if rectangleshyperrectangles and domains overlapped).
Finally, for each center point $c_i,$ compute the set $C_i = \lbrace j\in 1,\dots,N : c_i\in R_j\rbrace$ of rectangleshyperrectangles containing that point.
Now define binary variables $x_i,\,i=1,\dots,N$ which will indicate whether or not rectanglehyperrectangle $R_i$ is part of our cover. The objective is to minimize $\sum_i x_i,$ the number of rectangles used. To avoid rectangleshyperrectangles intersecting, for each $(i,j)\in S$ we add the constraint $x_i + x_j \le 1,$ preventing us from using both. Finally, to ensure that everything outside the function domains is covered, for each center point $c_i$ we add the constraint $\sum_{j\in C_i} x_j = 1,$ requiring that the center point belong to exactly one selected rectanglehyperrectangle. Since the rectanglehyperrectangle boundaries are grid lines, if the center point of a cell is in a rectanglehyperrectangle, the entire cell is in the rectanglehyperrectangle.
Once we have a solution, we replace the lower (upper) limit of any variable in any selected hyperrectangle with $-\infty$ ($+\infty$) if the edge of the hyperrectangle is on one of the boundaries of the box we imposed at the start.