Energy communities (ECs) can reduce energy costs and support local decarbonization by enabling consumers to collectively invest in distributed energy resources (DERs), such as photovoltaic (PV) systems and battery energy storage systems (BESS), and to share energy among themselves. However, sizing DER capacity becomes computationally challenging as the number of EC members and the planning horizon increase. Mixed-integer linear programming (MILP) algorithms can provide high-quality solutions but face scalability limitations. This paper proposes a hybrid MILP-Evolutionary Particle Swarm Optimization (EPSO) framework that combines the accuracy of deterministic optimization with the scalability of metaheuristic search. First, the MILP is solved over a reduced horizon to provide initial DER capacities. Then, this solution is used to initialize the EPSO population, which refines DER capacities over the entire planning horizon. Results show that the proposed framework achieves cost gaps below 1.6% compared to the full-horizon MILP optimum, while significantly improving scalability over an open-source MILP solver, making it a suitable alternative for larger ECs or longer planning horizons.