Two of my favorite shows, Law and Order and Homicide: Life On the Street, had two crossovers. Then Munch (Richard Belzer’s character on Homicide) became a regular cast member of Law and Order: Special Victims Unit. So all of them are in a shared universe.
(And I suspect Oz, the prison show, is in the same continuity too.)
We know Superman and Batman are in the same continuity from a few throwaway lines from the latter two Batman movies (“He must be halfway to Metropolis by now,” “Now I know why Superman works alone”), but all DC characters inhabit the same shared universe.
And the Marvel characters share their universe too. Even though different studios made the movies, Spider-Man, the X-Men, the Hulk, Daredevil, and Blade are all in the same continuity, and often interact with each other in the comic books the movies are based on.
X-Files and Millenium had a crossover once as well.