Consider a travel corridor with a multi-modal transport system (i.e., highway and railway) that connects a continuum of residential locations to a point of CBD. Both highway and railway are subject to congestion effects. All commuters travel along the corridor from home to work in the morning peak hour. The travel costs include travel time, schedule delay and monetary cost. The spatial dynamics of the traffic congestion on both transportation systems are determined by the trip-timing condition, that no traveler will experience a lower travel cost by departing at a different time or switching to a different mode. The flow dynamics on the highway will be considered by applying basic LWR model, while crowdedness (i.e., passenger density on the train) is used to describe the congestion on the railway. The simultaneous temporal and spatial dynamics of commute traffic pattern will be modeled by applying a second-order partial differential complementarity system approach. A time-distance road pricing scheme is applied to achieve the system optimal condition. The urban population is assumed to be located continuously along the corridor. However, the spatial population density distribution is regarded as variant. As is well known that the urban planning issue of population density distribution affects the transportation system significantly, this study aims to find the optimal urban population density distribution in a linear continuous travel corridor leading to optimal transportation system performance, with basic assumptions that it follows some given distribution pattern like negative exponential distribution. The problem is eventually formulated into a mathematical program with complementarity constraints and efficient solution algorithm is developed. Finally, numerical examples are conducted to test the model formulation validity and efficiency.