Yes, it does know
Monitors are sending EDID data which contains some information about the display, including its physical dimensions. Here's an example from my older question/answer:
Note the Maximum Image Size row, which says 52 × 29 cm (23.4 inch). So Windows does know physical dimensions of the display.
(The program depicted reads this information from Windows registry rather than query the monitor. EDID data is recorded by Windows for all monitors which were connected to the system.)
Windows probably uses this information
This is pure speculation based on my experience. The answer by @kreemoweet suggests that Windows may make these decisions based on some hardcoded information rather than, or in conjunction with, EDID information.
In the Display Settings you can set display scaling in 25% increments. On 14" laptops the highest available scaling option is 175%, while 15.6" ones can't scale over 125%. It seems to me that Windows makes sure on-screen elements aren't physically larger than some arbitrary dimension.
I think this information may also be used to pick default display scaling during Windows installation and for the initial settings. If someone can confirm or deny this, please do!
You're observing different scaling settings
In modern Windows versions (8 and newer, I think) you can set separate scaling factors for each display. Each window is scaled according to settings for a monitor which contains largest part of the window. The goal is to compensate for different pixel density and achieve roughly the same physical dimensions of desktop content on all displays.
That's why if scaling settings are different, when a window is dragged across a screen border it will at some point suddenly shrink or grow on both displays once middle of the window is on another display.