I'm really in two minds about this OP although there is no right way or wrong way and its really how you feel about it having thought it through.
So On one hand, I can see why you might be thinking "Why would I want to put myself through this again?"
On the other, However, I think the run-up to this event has had you thinking about the last one and really working out how you feel about it, which perhaps maybe wasn't something that was as clear when you were in the middle of the last event.
With this knowledge, would it be worth giving it one last shot and just seeing how things would turn out if you said something along the lines of. I can take a joke, but I don't appreciate that comment, its something the group tends to do although you may not mean to, it really made me think twice about turning up tonight.
And then turn it back on them very calmly Would you put up with it, if someone said that to you? Why do you feel the need to make jokes like that? Given that I've just told you how I feel, isn't it fair to expect that these meet-ups could be a bit kinder? And let them understand the dynamic from your point of view a bit better.
It might give them pause for thought and then, without being rude, you have said your piece. If you feel they haven't responded, then you can leave early and give it up without any worries about whether its right or wrong to give up on that group.
Also, it may turn out that the evening goes better than you expect, sometimes we are anxious in advance, but now that you have thought about what annoyed you about their attitudes last time, you are better prepared to nip it in the bud/re-educate.