SHANGHAI—This year’s selloff in China’s stocks and currency is reviving painful memories of the country’s last market rout, in the summer of 2015. If anything, things look more worrying this time around.

Shares in Shanghai are the world’s worst performing among major markets this year, tumbling 17%. The yuan has slumped 3.6% against the dollar...