Users describe the ticking problem as like the second-hand on a bad watch that runs continuously when the phone is unlocked. The high-pitched noise, on the other hand, happens only during calls. Turning off NFC often stops the clicking problem, and while that's obviously no fix, it points to where the issue may lie. The whining, on the other hand, seems to be unrelated. It's mostly Pixel 2 buyers reporting the issues, but several XL buyers also complained.
On the forums, Google told users that "if you are experiencing the issue, you should contact [tech] support to discuss RMA options." One user reported that Google agreed to send a replacement unit and test it ahead of time to confirm it doesn't have the same issue.
Minor QC issues on a new phone are to be expected, but multiple issues (on an otherwise excellent phone) isn't a good sign. As Samsung learned, Google would be best off to quickly fix the problems, tell buyers honestly what happened and apologize. Engadget has reached out to Google on the sound issue, but for now, all it's saying is that "Google has been made aware of the issue and is looking into it. We will keep you updated on this."