Given your foreshadowing impression of the establishment of a recurrent theme,
"corporate organised fun" starting to materialize
and that in a comment you clarify (the severity of) your antipathy towards participation to be primarily hinging on the (pseudo-)"charitable" nature of the event:
I take charity seriously.
Even if kind of "organised fun" by the company might not appeal to me, [...]
[...] the charity aspect of it on the other hands actively goes against my values.
1. The one-off, short-term solution
TL;DR Call in sick.
Have had a "bad lunch" the day before the event, share how you feel unwell, head home on sick leave in the early afternoon. Make it plausible. Disaster averted.
You get to do this once.
An aside on honesty: Personally, I value honesty above all, in any kind of relationship - be it romantic, a friendship, or with an employer - hence the "white lie" hasn't been recommended lightly.
Your earnest concern gives the impression that you enjoy your current workplace, the current dilemma aside, anyway. You haven't disclosed in how recent a future the event will be held, regardless, your employer has put you in the situation you find yourself in and your time to act is naturally limited. A "cop-out" feels morally justifiable to me. Maybe it'd be too far off your values too, maybe you haven't thought of the easy way out yet.
This advice is only valid under the assumption that the charity aspect is not part of the recurrent theme and that this is the only issue your having with your company.
2. Discreetly make an honest case
[...] the only reason why I'd occasional share my charitable activity being in persuading people closest to me to support similar causes.
I really disagree with having "competitions" (not explicitly, but everyone's contributions are visible) of who can get their friends and family to sponsor their "fun" activity for more cash.
This is a strong argument.
Present it properly, it might stick.
Ask your CEO for a few minutes of their time, make it clear that your issue isn't all that urgent, but that you'd like to speak in private.
How hard it will be to win them over depends on to what degree they also are the driving force behind the apparent manifestation of such activities. Regardless though, it is them you must convince, they are the decisive person in the company.
Explain why (you are concerned) the nature of the event (might) make(s) you uncomfortable.
Do not question occasional corporate outings in general, that battle cannot be won. Also, it would likely be a good idea to keep the disdain for using charity as a vehicle and not taking it as seriously as you do to yourself (not that I don't get it or disagree, it just won't be helpful).
Instead, focus on the monetary aspect and the disclosure of amounts in conjunction with personally identifiable information:
The social / cultural aspect, the inevitable "ranking" that will occur: Question whether monetary amount gathered / spent is truly the metric they'd like their employees to compete over and whether that's the corporate culture they'd like to foster.
The privacy / data security aspect: Employee data protection laws obviously vary between jurisdictions. Inform yourself about those in yours. Regardless of how strict or not yours are, employers generally tend to take those seriously.
Depending on your level of comfort, your personal dilemma: You are occasionally asking social circle to give for certain causes (and have recently done so) and therefore can't possibly ask the same people for this one with a good conscience.
Make clear that you will keep the conversation confidential.
Who knows, you might have a CEO whose mind can be changed.