Given what you’ve written, no, I wouldn’t retake.
It’s not the ACT. If you get the same score or lower it will make you look dumb. Or unwise.
You should only retake if you can dedicate significant time and resources to ensuring an adequate score increase. Your post makes it sound like that’s not gonna happen.
All this being said- 510 is a great score. You will be a doctor, but maybe a DO. If you can’t stand primary care or general surgery, that’s a problem, but if that’s the case I’d argue that you shouldn’t go to medical school anyway.
Of course, you can match plastics or ortho from a DO school. It’s just harder and more rare but it does happen.
One more thought- at the end of the day, learning medicine is on you. Your med school matters much less than you think it does.