As you suspect, these sentences are not formally correct (although they will certainly be understood and accepted in casual writing or speech), because their subjects are clearly the subjects of the subordinate clauses, not the subjects of the main clauses.
You may correct the sentences by moving the gerund clauses to points where the connection with the subject is more easily perceived. Here I place them after the clauses modified:
He thinks that I should keep on doing what I like to do, regardless of being criticized by others.
His mother insists that he has to go to school every day, regardless of (his) being bullied in class.
The gerund clauses could also be moved to points in front of the clauses they modify (after the subordinator that, so its clear that it is the subordinate clause which is modified) but this is rather stiff:
He thinks that regardless of being criticized by others I should keep on doing what I like to do.
His mother insists that regardless of (his) being bullied in class he has to go to school every day.