Answered by ZUPAN | Nov. 27, 2019 15:01
I understand your reasoning. Anyway, you should be aware that in China you will clear the immigration and perform all the formalities at the very first stop because this is the Chinese law. Their law simply states that all the formalities are done at the very first stop in China and you will never encounter an exception. In your case this is Shanghai and after that, although it is a single (through) ticket, the portion between Shanghai and Kunming is considered to be a domestic flight. So, since you will fly on a domestic flight, you will have to clear and perform all the formalities as I have described them in my initial answer to your post.
This was the reason why did I write about the challenge of performing all the formalities within a 2 hours time frame. Anyway, if your luggage is tagged all the way to Kathmandu, you will make it, although you will have to be quite agile and fast. By the way, a single (through) ticket, issued by, I assume, China Eastern puts them in a position to be responsible in case of your inability to catch your flight to Kunming. If I'm right and you are traveling on a single China Eastern ticket, you will accomplish everything within the same terminal and you will be also assisted, if necessary, by China Eastern staff. Please, just ask, just be annoying if necessary.
By the way, you should use a correct terminology and this is definitely not "24 hour no visa entry", but a temporary entry permit. Just use correct terminology to avoid any possible misunderstandings.