Wealth distribution under the spread of infectious diseases