J-10 should certainly have a healthy life ahead of it. I can envisage a post-2020 J-10 equipped with e.g. WS-10G, further use of advanced composites, modest RCS reduction measures, backporting of certain J-20 technologies such as Sino-EODAS, CFTs, further generation of EW gears, integration of new missiles, etc.
Regarding J-31, I am of the school that believes it to be a future carrier-based fighter. As such, further evolution of J-10 can offer little to no competition in this regard. Besides populating future carriers, PLANAF must also be thinking about replacing its inventories of Q-5, J-7, J-8 (total of 100 aircraft by Wikipedia) and even original JH-7s. There are several possible candidates, but considering the rapid growth in carrier aviation anticipated over the next few decades, replacing these aircraft with a carrier-capable aircraft such as J-31 would maximise PLANAF flexibility going forward.
For PLAAF it is a different story: they have no carriers to worry about, and are already invested in J-10. It is very conceivable that a further evolved J-10 might be an attractive and relatively inexpensive prospect for replacing legacy aircraft types that remain post-2020.