1. I want to learn whom to drive to the place.

2. I want to learn whom I should drive to the place.
3. We want you to drive us to the restaurant.
4. I don't know whom to drive to the restaurant.
5. I don't know whom I should drive to the restaurant.
------------------------------------------------
Are they all grammatical? Can we substitute 'who' for 'whom' in each sentence?

1 and 2 will work if you're asking about driving another person somewhere.

3, 4, and 5 are fine.

Don't substitute "who" (used for subjects) for "whom" (used for objects).