The rainbow torch burns down in 15 minutes, however the burnt torch will return to its original state after 1 hour as mentioned by Mirade here.
If you let it burn down completely without switching it off, it will turn into a burnt down rainbow torch and can be lit again after 1 hour.
EDIT: With the update on June 7, 2022 the torch won't burn down when lit after requests and complains from the community, meaning it will remain lit until a player use it again to unlit it.