That depends by what you mean by “modern”. And the age of the system of question is completely irrelevant to whether it is or isn't an unmaintainable legacy mess.
wait a minute I thought legacy was used to refer to old pre-cloud pre-serverless pre-javascript software? Everything written nowadays is modern and hence you just replace it with more modern stuff. re-writing it is often difficult because of its modern layers.
I hope this is satire, but I’m not sure if it is.
r/programmingcirclejerk would have a field day with it, that's for certain.
Any code that’s not Serverless JS needs to be rewritten