It's not the preposition per se that governs the form of the verbal complement. It's the constructions in the main clause that affect the forms of the verbal complements.
The examples you give show that each construction "licenses" or allows the bare infinitive.
Note that not all forms of each verb take the bare infinitive. If the complement of the main verb is a to- infinitive, to may optionally be used with the infinitive complement:
What we're attempting to do is (to) bring the parties together
What they're refusing to do is (to) withdraw their representative
If the main verb is in the progressive, the verbal complement is the -ing form:
All I was doing was offering him some advice
The puppy is doing nothing but making messes on the floor
Yes, each construction must be learned, one at a time. Unfortunately, there's no easier way.