Miners will still do the job and they will now mine to confirm transactions and they'll earn through the tx fees. Read these articles for better understanding.
Will miners continue to mine bitcoin after that? Will mining still be profitable? Will miners used in mining evolve to consume less electricity and make mining profitable with fees in the future? How will miners survive with tx fees? I doubt miners will still do the job if these questions are still questioned 50 years from now. I also think that instead of earning through tx fees alone, there would be methods invented to make mining profitable again before all bitcoins are mined in 2140.