what is [flavor-wise] the closest nonalcoholic substitute for white wine and red wine?
I depends on the recipe, but generally no, white wine vinegar is a very different product than white wine. Vinegar is produced when bacteria eat alcohol and produce acid which changes the flavor dramatically. If the recipe calls for acid already (for instance lemon juice) then it can work, you just reduce the additional acid. The result will still be different though.