... The problem is, if one motor goes bad, and the VFD trips out, it will have to be reset to run the other motor. It could be done, but it's going to be a somewhat complicated control scheme.
This is really the only problem, other than also making sure the VFD is turned off (Stop command, done ramping down or braking if enabled) before switching motors. Lets think this through a bit.
The VFD is the primary means of protecting the motor from overloads and faults. Let's say the load jams somehow (you didn't say what the load was). When the VFD senses an OL in the motor and shuts down, it switches to the backup motor but will require overriding the VFDs thermal memory so that it knows the new motor is cool. If you do that, and the 2nd motor then immediately faults on overload too because the load is still jammed, the VFD switches back to motor 1, clears the thermal memory again and fries motor one. Then it detects that new fault, switches back to motor 2 again, but clears the thermal memory again and then fries motor 2.
There are a few VFDs that allow you to program multiple motor parameters into them, but they still may have only have one motor thermal register (the memory that keeps track of the motor heat for OL purposes). So the way to do it if you don't have that ability in the VFD or it doesn't have two thermal registers would be to disable the motor protection features in the VFD and use external motor overload relays for each motor. You will also need separate mechanically interlocked contactors for the motors, that way you can't accidentally turn on a second one while one is running and fry the VFD transistors. By the time you are done with all that, you may have been better off just buying a second VFD, but it depends on what size you are looking at. 10HP and under, I would just buy the 2nd VFD and be done.