Is it possible to extract Nexus 7 serial number through command line (e.g., ADB)?
The "device offline" output means that the device is detected, but it refuses any operation because the user didn't allow that particular computer to connect (secure ADB). Your device is up and running, and displaying a confirmation window on its non-functioning screen. You could try to power the device on and blindly hit the OK button after unlocking the screen, then all ADB commands should work. Alternatively, if you have used ADB with another computer, try it with that.

Also, all devices offer some kind of ID even in this state, displayed by "adb devices"; this is the serial number most of the time. See if it's the right format.

Edit: "fastboot devices" should show the serial number too. Also, it should be easy to put the N7 into fastboot mode even without a screen.