This sounds like it might be the story Containment (2010) by Christian Cantrell.
This is fairly recent, as noted, and a Kindle edition is available.
a bunch of people colonized a planet
Containment is set in a future Venus colony. Because the Earth's environment was being destroyed, an expedition was sent to colonize Venus to prevent the complete extinction of humanity. Venus was selected, despite it being a hot, toxic environment, because its gravity is closer to Earth's.
but limit births due to lack of oxygen
The protagonist, Arik, is a member of "Gen V" (for Generation Venus), one of the first cohort born in the colony. There are only 100 members of Gen V because of a strictly limited oxygen supply.
The main guy ... goes out trying to plant in the alien soil
Arik is working on artificial photosynthesis to supplement the oxygen supply the colony gets from its plants (genetically modified ferns). He also has a dream of breeding plants that can survive unprotected on Venus, to start the process of terraforming Venus.
One day he has an accident while working outside the colony, and wakes up from a 3-month coma to find his wife pregnant with a child that the colony can't support.
The strange accident and the pressure of a potential child push Arik to dig into the mystery of his accident, and what the founders may know that Gen V has not been told.
gets out through the wall, turns out they're still on Earth after all
In the end he discovers that the colony isn't really on Venus, it's been on Earth all along, and the purpose of the ruse was to try to force research that could be used by Earth.