If someone were to be born into a shi’i family and then leave Islam then later repents after realizing his errors, would his repentance be accepted by Allah? And would he need to compensate for the ramadan fastings and mandatory prayers during his period of apostasy?

If we repent sincerely and stop sinning then He will guide us. You will need to make-up the missed fasts and pay any applicable kaffarah, and make up the prayers