I would say, your UPSC preparation phase starts only towards the Final Years of Graduation or maybe while youre on your First Job. Otherwise the First 2-3 Years of Engineering you do need to deal with the branch you select in detail. Hence my suggestion would be select the Branch where your interest lies. If you and your Studies are well synchronized during Engineering, your activitues in day to day life somewhat get sorted, besides you giving time to your interests or UPSC CSE Preparation. However, Electrical Engineering is much tougher than Mechanical Engineering in Curriculum, hence this might be a point to consider. Secondly Mechanical Engineering, has a strong scope even in Private, PSU and Public Research Sectors across Domains.
For more information about Engineering Courses in India do follow the link below
https://www.careers360.com/courses/list-of-engineering-courses-in-india
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile