1. Make sure you pass the first year exams well.
2. Check out the other university you have an offer for. Make sure that your reasons for choosing it over the one you are currently make it worth the upheaval of changing.
3. Stop worrying about league tables. Whilst some employers will whittle out applications by where you studied, most start from degree class, if that is relevant.
You are doing engineering, if you are aiming for an engineering orientated job, then your ability matters more than where you studied. I know many engineers who came through the apprenticeship route, studying at places league tables don't rate who are very successful.
4. If your A level grades bother you and you have the capacity for self study. Why don't you just retake the ones you got a D and a U in the evenings at a college local to your university. I've known people with worse grades go from that to 1st in their UG and finish up with a PhD. Bad grades are not the issue, it is what you do after getting them.
5. Remember, some employers require you to list any exam you have taken since age 11, so you may not escape your BDU by retaking. So retake for you not some future employer.
6. Going back at this stage may seem like a a good idea. But it can be hard to maintain the momentum through full time retakes, applying for uni again and another 3/4 years of a degree. There is no guarantee that you will be any happier. The friends whose happy Facebook university life you seem to envy, will be starting their careers, whilst you are still studying. That is another lot of angst for you to get through. You need to focus on making yourself happy, maybe the university you are at is the issue, maybe it's not. Next year, you might have come to terms with the things that affected your exam performance during your A levels and have a much better time. You may not have experienced 1st year eurphoria like your friends, but you might hit your stride in the second year. Similarly it is not uncommon for a fabulous 1st year to transistion into a slog 2nd an/or 3rd year.
7. Post graduate study is a great way of having a different study experience at a higher ranked uni (if that still matters to you).
Whatever you decide to do, good luck.