1. You have good academic credentials
2. You are trained in a "hot" field (my Ph.D. was in Physics but I've always loved software engineering and ML, but that was a very hard transition for me to pull off)
3. Getting a year or two under your belt is probably better than a large gap in your career if things continue to go south on the employment front. I suspect a decent number of ML/Datascience people are going to be laid off if they haven't already because they end up being more expensive and it isn't as easy to quantify their net impact / benefit to a company.
Just focus on how you can use your time at any job right now to improve your skills and round out your profile so you are a more attractive candidate for the kinds of jobs you'd like to target in a few years.
Also, if things bounce back in the next year, demand is still going to be high and you should be able to find a better job and switch relatively easily.
I'm debating if I should take the job, assuming I pass the interview, to set foot in industry or keep searching continue working on a potentially monetizable passion project.