Reasons for pain after RCT can be many. It also depends on when the treatment was done, what was the infection level before treatment and how was the healing before cap/crown placement. Under obturation may not be an issue always and even if it's the cause can always be retreated.
As for the crown dislodgement it can be cemented back if it's acceptable or evaluation of the reasons for dislodgement and correction is required.
Next Steps
Visit your nearby dentist and get the cause evaluated. Have trust. RCT relieves pain not cause it.
Health Tips
Don't delay the treatment in order to save the tooth