What's the benefit of having security outside the airport?
There are tons of airports that connect to cities by rail transit. Within the recent past, I've been in three of them, PVG, HKG, and KHH. In no case do they put security outside the airport.
For one thing, subway lines have multiple stops. In order to make sure that everyone who's going to the airport has to go through security, you'd want security to occur after the last stop before the airport... and the site after the last stop before the airport is the airport.
For another thing, why would you want to subject people who aren't going to the airport to airport security?
When was the last time you thought "this check-in process would be better if it took up a lot of space in the city center, even though the time requirements wouldn't change"?
Now, rail transit to PVG takes multiple hours. But if you replaced the subway connection with a dedicated rail line with one stop in the city center and one at the airport, that wouldn't help much - that just means that people living nearer to the airport have to travel backwards to the city center, subject to the speed of the subway, so they can take the dedicated airport express to the airport.