The ESRB’s rating system is a system derived to allow large retailers to curate the entertainment software they’ll be selling. The ESRB is a board entirely self-regulated by the largest publishers of the videogame industry, and doesn’t really have any legal power per-se with the ratings. The ratings were simply created to give retailers a cheat sheet on weather or not the game’s content aligns with their brand image. For example, you don’t want to be selling games with zombie strippers two aisles over from the LEGOs and Hot Wheels cars. As Nintendo, Sony, SEGA, Atari, Nokia, and Microsoft were all platform holders and all had to sell through these stores, they became members of the ESRB and made it standard that any games sold on consoles and through first party PC stores had to be rated accordingly. However, for third party and homebrew games this is in no way necessary. Unless you agree to deal with an ESRB member, such as Sony’s PlayStation or Microsoft’s Xbox or Microsoft Store, you are not required to have a rating for the game.
Putting a nudity warning up and a legal disclaimer about the adult content before the game starts properly is a good idea though. Some places still have obscenity laws in place, and some people create lawsuits over potentially offensive material in videogames. Be sure to cover yourself legally in this area.