With -x -N, wget would truncate long file names to fit local file system's restrictions. But wget 2 does something quite weird: it seems to download the file fully (sometimes takes a long time for large files), but does not write it to disk, and error at the very end.
It should either abort at the beginning if it can't write, or does what wget 1 does, truncate long file names to fit.