You are using strawman arguments here.
First you talked about a 1500-line function. Then you say that you need a 1 manyear to decypher and write the tests. That does not match.
If it's a huge library with lots of functions, you don't need to do everything in 1 go. You can refactor as you go: when you need to "touch" one function, write the tests for that individual function, and then refactor.
But alas! It cuts straight through your well-defined functions and components! (Remember that this is inevitable: The domain itself is spaghetti such as regulatory directives or telco protocols.)
Saying "the domain is spaghetti" does not mean anything. All domains change. All domains that are worth writing programs about are complex.
Code can't be done like a building, or a bridge. Bridges have the Laws of Physics. Code lives in a changing environment. You can't build a bridge if every moment gravity changes, and the next one steel becomes jelly.
That's why they pay us: to make code that not only works, but adapts to changes. That is the whole point. You must know how to make code that adapts. If you don't, search for help - read, go to workshops, or do something. It is your job to know how to do those things.
The code you showed is not a product of "the domain". It's a consequence of bad programming practices, and nothing else (with the possible exception of badly informed management).
And he is right. Refactoring every two weeks is not a realistic option.
Another strawman argument. I never said refactoring every two weeks. I say refactor *as much as you can*; not every 2 weeks, every day.
And explain the problems of not refactoring to your manager, which is also part of your job.
Your manager's immediate job is to increase the ROI, but in a larger scale he also should make informed tactical decisions. Your job is to provide him with all the information to make those decisions.
Let me present you both scenarios.
If you add tests and refactor, at the beginning (and for some time, depending on the size of the library) you will go more slowly. But sooner or later adding features will become easier, you will get less bugs. And you will be happier. If you end up leaving the project, a new programmer picking it up will have lots of help from the tests.
If you just leave the big functions be, you will eventually get tired of maintaining that monstrosity. And then you will start looking for other jobs. And then you will leave your company, and your manager will be left with a new programmer, who won't have any idea of what the code does or why. The cycle will repeat.
Adding new features will get increasingly more difficult, and bugs will appear with increasing frequency. At the end either the company will lose their clients or they will have to abandon the product and start from scratch.
Choose.