Based on publicly available stories, Palantir doesn't actually gather data on its own: they are purely an analysis platform for data that their customers already have (or have separate contracts to buy). It sounds like their secret sauce is somewhere in the ETL/dataviz/ML space. That makes them fundamentally weaker than Facebook, because Facebook collects and owns the data.
I see the companies as wildly different not on what they do but their ethics. That's not to say either is a noble cause, but certainly one could imagine a fairly evenly distributed 2x2 matrix of people who find the actions of either company ethical or not.
If you work for the government, there is a theoretical chain of accountability to the public. But if you work for the government, you are working for the largest lever of power and abuse. If you don't work for the government, your only accountability is your shareholders and customers (in Facebook's case advertisers.) However, Facebook's "mission" is defensible insofar as they're able to disentangle themselves from the conflict of interest between their users and customers.
Truthfully today I think both companies have immense moral hazard. But I think Facebook is the one of the two which theoretically could dig itself out of it if they start better aligning their own incentives with the ones society has.
The problem with Palantir is that when you combine their business model with the inherent drive of capitalism for growth at any cost (witness the ethical breaches from Google, Apple, Amazon, Facebook - all already epically successful), you end up with a monster. Especially with Thiel calling the shots.
Trusting tech is dangerously naive, but trusting values is all we can do. For people concerned, I'd ask, which company is going to effect your life outcomes more?