Differential variational inequality approach to dynamic games with shared constraints