I think you are looking more at examples of exceptions than anything with QB ages. Yes some of the truly great players can last to 40sih, but very few are doing so. Joe Flacco is technically still playing, but he probably shouldnt be. He had a magical 5 game run with Cleveland, but has been mostly a backup level player at best the last several year. Kirk Cousins is clearly showed signs of regression last year and is unlikely to enter the season as a starter. Russell Wilson is still getting chances with bad teams at 36 years old, but it doesnt mean that he is still a quality QB. Roethlisberger played til nearly 40, but clearly not the same player after that 2018 season. Similar situation with Rivers, Matt Ryan, Eli, etc. who all hung around longer than they should have.
One of the common knocks on Dak even early in his career is that he would be unlikely to age gracefully given his play style and body structure. To his credit I think Dak has improved as a passer more than most thought he would to help prolong that, but hes clearly reached injury prone status at this point with just one full season under his belt since 2020. He seems like a guy that will end up playing into his late 30s, but I think there is a really good chance that is due to a lack of QBs to fill all 32 teams rather than Dak playing at a high level.
The Cowboys need to be careful about his contact structure starting next offseason so they can remain open minded on dumping him and not be forced into a nother extension in order to gain some cap relief in 2027. IMO the Cowboys really should view their time with Dak as a two year window to be seriously competitive, which is why its frustrating to see them not be more aggressive in recent offseasons.