Well something to consider is, are you prepared for second year? Even with extenuating circumstances etc, if you don't have the knowledge base to support you in second year studies, it will probably lead to you just doing poorly in second year anyway. Although there may be other ways around this, do consider whether continuing straight into second year with the retakes ahead of you still is going to be conducive to you doing as well as you can in the second year modules/papers.
Them having you take a year out is probably because the exams are only set for the end of term period(s), and the summer resit period. They can't really do much else other than have you take the exams the next time they are available. You could ask if you could just resit the year entirely, which would allow you to attend and then take the exams (and provided your extenuating circumstances are accepted, you could still retake in the summer if need be).
In terms of the accommodation, you may be able to find someone to take over your contract (whether they would pay you the non-refundable deposit amount is debatable though). You could also discuss with your university the financial situation that puts you in, and whether there is anything they can do to support you as a result of that (since you can point out the reason you're going to be out of pocket for that is because of how they are scheduling your return to uni). Universities do have limited adversity funds to help students in need, and since this would be their fault, arguably, you may well at least be able to press them into doing something to help with that (even if it's just putting you in contact with students who can take over your contract).
@claireestelle might be able to suggest some other options you could consider?