Just to make sure I understand your question, I surmise that you have, in your main panel, a 50 amp breaker. One set of wires is connected to that breaker, and serves the oven. A second set of wires is connected to the same breaker, and serves the subpanel. Is that what you mean?
Some manufacturers of panelboards and breakers have tested their equipment with more than one connection under a single lug. Others have not. It is a question of fact as to whether your equipment had been listed by its manufacturer for double-tapping. The NEC will allow it if, and only if, the manufacturer allowed it.
So we can?t tell you if it is OK or not, without knowing the make and model number of the panels and the breakers.
Whether or not it is allowed by code, it is not a good design practice. I would not want my Thanksgiving dinner preparations interrupted because something on the subpanel overloaded the 50 amp circuit.
What, by the way, do you mean by ?my Inspector?? Did you hire a Home Inspector to assist you with your decision on whether to buy the house or whether to ask for certain repairs as part of your offer? That is generally a good idea. But you need to understand that these people are generally not experts in any of the disciplines related to home construction. They do not have the authority to declare that something violates code or to require the owners to repair anything. They can give you information that can help with your negotiations with the owner. But if it comes down to something being a code violation or not, or something requiring repair or not, you need to turn to someone within the relevant profession (e.g., electrician, plumber, Air Conditioning specialist, roofer, etc.).