Can I discard a race or class card directly from my hand to avoid charity?
You can't voluntarily discard a card from your hand, you can only play it or give it away.  But you can freely discard races and classes in play or sell items in play. During charity you can play cards instead of giving them away if you want to.

So, you can play a race, discard it, play a race, discard it, wash, rinse, repeat.  Unless you had some type of curse preventing you from discarding your race; then you are stuck having to give it away to someone else.