What the hell? Somebody has deleted my Nexus 5x vs Pixel 3a comparison. It was a very, very long post. I talked about low light performance, dynamic range, macro performance, zoom performance, artifacts, white balance, autofocus, flashlight, selfie camera, hardware specifications, etc. Unbelievable that somebody deleted my post. It took me more than an hour to write it!! It was posted in the Nexus 5x forum. I got a private message that it was deleted because it was in the wrong forum...
So here's the very short conclusion:
The Nexus 5x (with Google camera 4.3 or 4.1 in HDR+ On mode) takes better photos than the Pixel 3a due to much better white balance (indoors as well as outdoors, sunsets as well as normal daylight photos). The dynamic range is nearly identical, the Nexus has slightly better dynamic range as the 3a overexposes more often. The Pixel 3a has more details in low-light conditions, if you choose HDR+ enhanced or Night Sight. Though if you use Pixel's zero shutter lag HDR+ mode in extreme darkness, then it performs slightly worse than the Nexus. Then you need to choose HDR+ enhanced and the results will be better than the Nexus.
I compared both phones in multiple light conditions side by side for nearly two months every day.
Many people don't know how great the Nexus camera was because the default mode of the Nexus often didn't choose HDR+, you need to choose HDR+ On, then it always chooses HDR+ like the Pixel. The default mode of the Nexus often produces terrible results because it often doesn't choose HDR+ because the Nexus didn't have a zero shutter lag HDR+ mode, its HDR+ On mode is rather comparable to HDR+ enhanced. So Google didn't want to annoy people and decided to rather not use HDR+ in many light conditions, if you used the default mode.
So in most cases the Nexus has a much better (HDR+ on) camera than the 3a due to much better colors and white balance, unless you prefer more details in not perfect light conditions. Therefore now I have to carry two phones.