The prefix and suffix are the same, but the roots are different. The prefix is “cum”, meaning “together”, “with” sometimes just used as an intensifier. Commiserate is from cum + “miserus” (unhappy, sad, related to "miserable"). The literal meaning is to feel sad with someone, to be sad together.
Commemorate comes from “cum” + “memorare” / “memoria” (to remember / memory). The idea is that when we commemorate something, we remember it together / with each other.
The suffix “-ate” appears in anglicized versions of Latin first conjugation verbs, as well as words derived from the Latin passive / past participle. It’s originally just a grammatical suffix with no semantic content.