This research investigates the multi-objective optimization of a geothermal-driven multi-generation system designed to produce liquid hydrogen and oxygen as its primary outputs. The system incorporates a Proton Exchange Membrane (PEM) Electrolyzer alongside a modified ejector-based Organic Rankine Cycle to generate the required Energy (heating bar, cooling bar, electricity and hydrogen). Case studies were conducted in three distinct locations: Zanjan in Iran, Aarhus in Denmark, and San Bernardino in the United States, utilizing actual geological and meteorological data for accuracy. Simulations were executed applied Engineering Equation Solver & optimization of the system was carried out to enhance performance by focusing on the objective functions of system exergy efficiency and cost reduction. This was accomplished by utilizing response surface methodology (RSM) along with Minitab software (MS).To optimize the system, six decision variables were identified as critical parameters influencing performance. The optimization results indicated that the system can achieve an exergy efficiency of 53.74 % while maintaining a cost rate of $31.56 per hour. The overall cost rate for the geothermal system was determined to be $54.50 per hour, with $10.10 per hour allocated to hydrogen production and $44.40 per hour to electricity generation. Site-specific analyses highlighted San Bernardino as the most favorable location for implementing this system, projecting an annual production of 90.8 tons of liquid hydrogen and 208.3 kg of oxygen. In August, the geothermal system in San Bernardino can produce up to 7691.6 kg/h of liquid hydrogen, while in December, production decreases to 7402.8 kg/h, marking the lowest output for the year. In contrast, Zanjan and Aarhus demonstrated lower production capacities, underscoring the system's feasibility as dependent on site-specific conditions.