What could cause pain after erection ejaculated?

It depends. Pain after ejaculation can be caused by trauma, infection, or irritation. Knowing where the pain is, would be helpful to identify the cause of pain.