After the rapid expansion of the subway system over the past two decades, some cities are preparing to build more suburban railways. The emergence of suburban railways is bound to change the choice of suburban passenger transportation. This paper studies the factors that affect the choice of travel mode at the construction stage of suburban railways, aiming to design a more rational suburban railway network and urban public transport service system. Taking Shanghai as an example, this study first surveyed revealed preference (RP) and stated preference (SP) among urban-suburban travelers. Then, we used discrete choice models (DCM) and machine learning algorithms to build a travel mode choice model based on data collection and analysis. Furthermore, the importance of each factor was analyzed, and the effects were predicted under several traffic demand management schemes. Finally, this study proposed some strategies for increasing the share of public transport. On the one hand, it is suggested that Shanghai should continue to develop suburban railways and maintain low pricing of public transport services. Considering the construction and operation costs, the government needs to provide certain subsidies to stabilize prices. On the other hand, as passengers are very sensitive to the “last mile” trips in their suburban railway travel, transport planners should strengthen the connection from and to the suburban railway stations by developing services such as shared bikes and shuttle buses. In addition, the results indicated that some traffic demand management measures can also contribute to a larger share of public transport.