Most resources online assume that licensing is a non-issue for compiling CPython extension modules for Windows, because they recommend installing Visual Studio Community Edition for free. However, that does not work in an enterprise setting where the Community Edition license is invalid.
It's unclear whether the MSC compiler falls exclusively under Visual Studio licensing now. It appears to have a complicated history of distribution with and/or apart from Visual Studio as noted in this answer. Older versions have been distributed under other licensing terms, but the one needed for the latest version of Python 3.x (MSC v.1900) does not appear to have ever been named explicitly in any license agreements.
It's not clear what license(s) apply to MSC v.1900 due to vague scope. It was distributed apart from Visual Studio with the Microsoft Visual C++ 2015 Build Tools (official announcement), with unclear licensing. Then in this community post, a member of Microsoft support identified the "Microsoft Visual C++ Build Tools" license as the most applicable, which does not specify any restrictions for commercial use. Later, in the comments for the official announcement, Andrew Pardoe identified the "Supplement for Microsoft Visual Studio 2017" license as the most applicable for the successor to that package, the Visual Studio 2017 Build Tools. The download link for the original Microsoft Visual C++ 2015 Build Tools appears to have been removed from the official announcement.
Is there any way to compile an extension module for the latest official Windows builds of CPython (3.5 - 3.7) without a Visual Studio license?