noun
all ages to come; eternity; posterity
Refers to the far future, all future generations, or an indefinite long time. Often used in set phrases like 末代まで (for all eternity) or 末代の恥 (a lasting disgrace).
この失敗は末代の恥だ。
This failure is a disgrace that will last for generations.
彼の名は末代まで語り継がれる
His name will be passed down for all ages to come.
Compound of 末 (end, future) and 代 (generation, age). The exact historical derivation is uncertain, but the meaning 'far future generations' is well established.