If by inside we mean excluding the numbers on the boundary, then the answer is 4. It can be easily seen that this works by putting the number 4 on all points. If there were a single 2 or 3 the square enclosing this number would have interior sum equal to 2 or 3. If there were only 1s, taking a 3x4 rectangle would give us an interior sum of 2. Thus the answer is 4.
However I think the problem meant that we also have to consider the boundary, in which case 4 also works. But in this case the configuration with all 1s also works, because the sum is always $S=1*m*n$, where $m$ and $n$ are the sidelenghts of the rectangle. So In this case the answer is 1 (if we don't consider degenerate rectangles)