I don't think he's underrated. I think he has some ongoing health issues with his lower body that keep him from always being the player we see on some plays and in some games. A healthy Cooper is about as hard to cover as anyone in the league. When his lower-body issues are a problem, it takes away from that speed and route-running ability that put him in that upper echelon.
Remember that the Raiders chose to trade him away, which you generally don't do with highly rated players (although they also traded Khalil Mack, so part of it was the Raiders going full rebuilding mode). However, here's the key IMO to why they traded Cooper. Gruden said during the offseason: “That’s been one of our number one objectives is to make number 89 the main vein of our pass offense. If Coop can
get healthy and stay healthy, we expect big things from him. He’s gonna be the main target I think in a lot of our passes.”