Public transportation vehicles, with their confined spaces and limited ventilation, are considered among the primary factors in the spread of COVID-19. As a measure to slow the spread of the virus during the pandemic, governments have applied passenger capacity restrictions to ensure physical distancing. On the other hand, the increase in the risk of disease transmission associated with passengers waiting together at stops is omitted. In this study, we consider the risk of disease transmission as a travel cost and formulate a risk minimization problem as a transit network frequency setting problem. We develop a bi-level optimization model minimizing the total infection risk occurring at stops, namely, the cumulative disease transmission risk cost. The Differential Evolution algorithm is employed to cope with the NP-hard bi-level transportation network design problem. We propose a novel objective function for the upper-level model, considering the infection risk cost based on passenger traffic at public transportation stops. A congested user-equilibrium transit assignment model is utilized to determine passenger movement. The proposed model is applied to a small-size hypothetical network, and a mid-size test network. Experimental studies provide evidence that the model can produce optimal solutions. Optimization results show significant improvements in the reduction of disease transmission risk compared to the optimizations depending on the traditional practice of transportation network planning based on user and operator costs. The proposed model provides risk cost reductions of 51% and 22% compared to the optimal solutions based on user cost minimization in the hypothetical network and Mandl’s network, respectively.