Switching from civil engineering to mechanical engineering in the second year may be feasible, as many foundational courses like physics, chemistry, calculus, and statics are similar in both programs. However, it's important to consider that curriculum changes may have occurred, and some specific courses might differ. Taking required courses during the summer could be a strategy to avoid repeating an entire year. Consulting with an academic advisor is recommended to understand the implications of the switch and to explore the best path forward.