Shared autonomous electric vehicles (SAEVs) are predicted to become a significant solution to reduce global emissions and energy consumption resulting from urban transportation. The centralized operation of SAEVs not only allows large-scale travel demand response but also can provide essential ancillary services to the smart grid through the concept of vehicle-to-grid (V2G). With V2G technology, unused electric vehicles can work as a distributed energy storage facility for the electricity grid to smoothen the intermittent demand. Designing and operating a V2G-enabled SAEV system is challenging. This problem involves complicated planning and operational decisions, as well as time-varying electric tariffs. In this work, a flow-based Integer Linear Programming (ILP) model is formulated for determining the optimal configurations (charging infrastructure and fleet size) and daily operation strategies (serving passengers, relocation, charging/discharging). The developed mathematical model allows for maximizing the total profit, comprising investment cost, revenue from serving passengers, and V2G profit through charging/discharging schedules. A two-stage Benders decomposition-based algorithm is proposed to address the sophisticated ILP problem. Via testing instances in the Manhattan network based on realworld and synthetic data, we have demonstrated the feasibility of our approaches and studied the benefits of integrating V2G in the SAEV system.