Why will my MacBook Pro (15" Late 2016) not power on after disabling 'Boot on Lid Open'?
The setting is stored in NVRAM, so resetting that should undo the new nvram setting. Unfortunately in this case, NVRAM is persisted like something written to disk, so neither SMC nor disconnecting the power can undo the setting.
Try using the automatic power on as part of the NVRAM reset. With the Mac having shut down after showing the battery indicator, hold ⌥⌘PR then connect the power cord instead of pressing the power button. Keep holding the keys for at least 20 seconds.