Free doesn't matter here. JetBrains is an established toolset that people pay for. They've already been competing with free, and free didn't put them out of business. In some ways, free likely made business better than ever (I know alot of devs that started with VS Code and moved to JetBrains for various reasons)
They can have all the money in the world and it doesn't mean much in this context.
For while Microsoft is going to invest heavily in a Cursor / Windsurf like product and likely do alot to ship it in their editors - likely with exclusions or lag times between updates on other platforms - there's zero reason for Google to do this for example, when they could sell through Gemini for Code as an extension across all editors.
I don't see JetBrains having issues because of AI tooling, for most of these companies, its a boon to be on the JetBrains platform. Especially because JetBrains has lots of enterprise customers who would naturally be very interested in buying AI tooling for their developers. Its a natural market