I think you have that flexibility backwards. Coal can be ramped up relatively quickly and operates in nearly all weather conditions, but wind and solar are at the whim nature. Unless you're only talking hydropower and nuclear power which China is also building, but those like coal have significant upfront capital investments and minimum scale.
Either way, the idea that coal is economically infeasible is contradicted by the fact that China is building huge amounts of it[1]. For China energy production is an "and" question, not an "or" question.
[1] https://www.carbonbrief.org/chinas-construction-of-new-coal-...