How to politely tell someone I don't respect their opinion/viewpoint/judgment.
It all boils down to this. Be polite, but tell them to "get lost" (to use the slightest word (pun intended)). There's no way one can achieve that. The other person will take that as an insult because you minimize and lower to the maximum their contribution and value and insult them up front. So, I'll kind of offer you a frame challenge, by saying your approach should be more of a detached stance, dodging the direct confrontation while showing assertivness and setting boundaries. Don't do anything that will make or keep the discussion open. Don't argue, as they'll always find a way to show you how wrong you are and how right they are, even if one is a thrice-divorced alcoholic with a self-admitted gambling addiction. His failures will have build the experience you lack, that's why, in his POV, that's good advice. It makes them right. They need you to argue to keep talking. By telling them anything or by counter arguing, you just feed the troll.
I had a brother-in-law who was just like that. Unsolicited advice and recommendation about almost anything, from books to movies to real-life situations and so on... He knew better than anyone (including me) what was best for me. After years and years of this (we used to see each other a few days a year, not more), I finally stopped arguing and telling. I had tried all methods like the ones described and recommended in this article. I finally got to my point when I started to ignore and deflect: acknowledge and move on, change topic.
So, my advice would be to acknowledge what they just say and let it slip away. If they come back to it (and, believe me, they will!), just mention it's not a good time for you, because you're tired, you already have a lot on your plate...etc. They come back, dodge again. And keep doing that. The one with less patience gives up first, the one with more patience wins.
I can't find the source for that reference I once read/heard decades ago, so I can't give credit for it, but it roughly says:
don't be the ball bouncing back, be the wall it's thrown at.
The wall won't need energy, it'll just stand, will just be here, and resist. The ball will waste energy anytime to be thrown at the wall. It will keep bouncing back until one is tired getting always the same result and quit throwing the ball.