Millions of dollars in student debts will be wiped for hundreds of thousands of graduates in a cost-of-living relief measure ahead of the upcoming election.