Edit
It seems that RegionWithin
is better than the original method.
reg = Rectangle[];
n = 5;
sol = NMaximize[{r, 1 >= r > 0,
Table[RegionWithin[reg, Disk[{x[i], y[i]}, r]], {i, n}],
Table[SignedRegionDistance[RegionBoundary@reg]@{{x[i], y[i]}} >=
r, {i, n}], Table[{x[i], y[i]} \[Element] reg, {i, 1, n}],
Table[EuclideanDistance[{x[i], y[i]}, {x[j], y[j]}] >= 2 r, {i,
n}, {j, i - 1}]}, {r, Table[{x[i], y[i]}, {i, n}]} // Flatten]
Graphics[{EdgeForm[Cyan], FaceForm[],
Rectangle[], {FaceForm[Red], Table[Disk[{x[i], y[i]}, r], {i, n}]} /.
sol[[2]]}]
{0.207107, {r -> 0.207107, x[1] -> 0.207107, y[1] -> 0.792893, x[2] -> 0.207107, y[2] -> 0.207107, x[3] -> 0.792893, y[3] -> 0.792893, x[4] -> 0.792893, y[4] -> 0.207107, x[5] -> 0.5, y[5] -> 0.5}}
Original
For the $n$ points $p_i,i=1\cdots n$, we set $$d(p_i,p_j)\geq 2r,i\not=j$$ and all the distance to the boundary of region $d(p_i,Boundary)\geq r$
reg = Rectangle[];
n = 5;
sol = NMaximize[{r,
SignedRegionDistance[RegionBoundary@reg] /@
Table[{x[i], y[i]}, {i, n}] >= r,
Table[{x[i], y[i]} ∈ reg, {i, 1, n}],
Table[EuclideanDistance[{x[i], y[i]}, {x[j], y[j]}] >= 2 r, {i,
n}, {j, i - 1}]}, {r, Table[x[i], {i, n}], Table[y[i], {i, n}]} //
Flatten]
Graphics[{EdgeForm[Cyan], FaceForm[],
Rectangle[], {FaceForm[Red],
Table[Disk[{x[i], y[i]}, r], {i, n}]} /. sol[[2]]}]