I am not going to have a go at you about the morality of the situation, other posters have made clear that an error on the banks part is no mitigation. The money needs to be repaid to AIB (since they are the ones out of pocket and as you say yourself, when you contacted AIB about the cheque you thought Tesco had not received they actually refunded you fines and interest that Tesco had imposed)
AIB cannot talk to Tesco for you because they would be acting on your behalf. Think about it, you would probably be extremely upset with AIB if they went around discussing your finances with other institutions.
AIB are looking to secure a quick repayment of the €5400, hence the reason they are asking you to contact Tesco, however as you say that would be punitive for you as you would then have to pay an excessive interest rate to Tesco.
I think your best bet is to focus on AIB, offer to clear the €5400 debt on a reasonable time frame instead of their proposed solution which consists of you chasing Tesco for it and then having to work out how to repay Tesco.