This rectangular hole is extruded to the inside, then I tried beveling it to maintain shape, but after I add the subdivision it becomes an ellipse. How do I keep the rectangular shape?
Simply use ctrl-r to add a cut loopand take it near the hole edges. The more cut loop you make and the more they are near the original hole edge, the it will be squared. Attention that doing this you are increasing the poly count of you geometry.
Also Keith M answer is valid, bat as I know it can give problem in some cases.