The 2011 iMac only accepts video input via Thunderbolt. It won’t work with any other input — and the other machine must also be running macOS.
Additionally, I’m somewhat confident your adapter is the common from MiniDisplayPort to HDMI type, not the other way round (they aren't bidirectional). But even if it's the correct adapter, it won't work because the video input is not encapsulated in a Thunderbolt stream.
Target Display Mode via Thunderbolt will only work Mac to Mac.
The Late 2009 - Mid 2010 27” iMacs did but have Thunderbolt, and used Mini Display Port. These models could be used as a display for non-Mac devices, but like @Amethyst1 stated, this wouldn’t work with a non-bidirectional HDMI to Mini Display Port cable.
There could be software solutions to use your iMac as a display for your PC, such as Luna Display.