The first thing is to make sure that your world is coherent and can accomodate all characters you want to introduce. You need a reason for all of your characters to find them in one place and to you have to decide who the story will follow.
There are some examples you can look at to see how a cross-over can be done.
The simplest is probably Super Smash Bros., a series of videogames where the characters are from different series from Nintendo, all fighting against each other. There is a bit of story where you can basically fight with the starting characters through some battles against enemies that will be added as playable characters afterwards, but here we have a simple "world" that is often just stages that were inspired by the original worlds following one another. The focus is on the gameplay.
Another famous series is Kingdom Hearts, which is combining Final Fantasy and Disney - it's owned by Disney and published by Square Enix. Here you have a new world in which all the characters meet and a protagonist that is from neither of the original worlds. The focus is more on the story.
Therefore you first have to decide what kind of game you are creating. A first person shooter? A platformer? A brawler? A story-driven visual novel?
After that you have to define how important the world is. Is it just simple stages because the focus is on the gameplay? Or are you focussing on exploring the interactions of the different characters with one another?
Then you can decide how they should meet. Is it a new world? Do they travel through all the home-worlds? How do they travel? Is there a portal? Does a mage call them all to have a feast? Is there a gigantic intergalactic tournament? Some new character finds magic hidden in himself that allows him to go through different dimensions and now he is searching for a way home?
After that you have to think about which elements and characters fit together. Final Fantasy is story-driven. Mario is a platformer. Mario tries to safe Peach - that's about all the story he needs. Making those work together is more challenging because people who see Mario expect something different than people reading "Final Fantasy".
To take your examples: Mario is from platformer games, Pokemon is tactical battling with a bit of story. Both are present in the Smash Bros. series because fighting is normal in their universes and there is no need for big complicated story plots. Introducing Subway Surfer trains is hard. It could be a good stage, or a mini-game, but does the running-and-jumping play style really fit the fighting style of the other two? It could fit together with Mario as a platformer, but what does Pokemon have to do with this?
Once you decide what kind of game you want to create you have a basis to evaluate different franchises for their common elements and how they can relate to the game you want to build. This will allow you to see which franchises fit and which do not fit. Just taking everything famous you come across in hopes to get some publicity will likely result in a catastrophe.
Oh, and be aware of trademarks and such. Taking original characters and using them for your own product, especially from different studios together, may result in legal problems. But for this you would have to contact a lawyer.