We think both personal fit and meaningfulness matter a lot for job satisfaction, so it would just come down to exactly how bad you are at the work, or how little you care about it :)
https://80000hours.org/career-guide/job-satisfaction/
If I had to choose though I'd go for being good at the job you don't believe in. At least that way you have a better chance to build career capital and go into something better later.