WASHINGTON—The Trump administration indicated Tuesday it is considering allowing more Americans to erase student debt in bankruptcy.

A decades-old federal law prevents Americans from discharging student debt in bankruptcy court unless they prove to a judge’s satisfaction that they face an “undue hardship,” such a stringent standard that few borrowers even try.

The...