Is it safe for me to enter the consulate/embassy of my country? Note that I'm a "criminal" in my own country.
In general, no. Canada cannot protect you from your country of origin while you are in its embassy or consulate because these places are "inviolable" under the Vienna conventions on diplomatic and consular relations. This means that Canada cannot exercise jurisdiction there except with permission of the ambassador or consul.
Whether it's safe for you depends on your country and probably on the nature of your purported crime.
Is it safe for my child who doesn't have any connection with my "criminal case" to enter the consulate/embassy of my country?
When your child is subject to your country's jurisdiction, the only thing that prevents your country from persecuting your child for your purported crime is your country's own legal system. How effective is that system at preventing the country's government from violating people's rights in that way? What is the possibility that the country would undertake a secret operation to avoid the scrutiny of its judiciary? These questions have very different answers depending on the country and depending on how important you are to your country, but you likely have a good idea of what the answers are for your case and your country. I suspect that this may be a case of "if you have to ask, you already know the answer," but maybe not. I doubt that Edward Snowden's eventual children would have much to fear from the US, for example.
Is it possible to get arrested in an embassy/consulate, and how would I be transported to my country?
Yes, it's possible. Your country would have a difficult time getting you out, however. There are cases of countries trying to smuggle prisoners out in the so-called "diplomatic bag," which can actually be any sort of container. For example:
In 1964, a Moroccan-born Israeli double agent named Mordechai Louk was drugged, bound, and placed in a diplomatic mailing crate at the Egyptian Embassy in Rome, but was rescued by Italian authorities. The box that he had been sealed into "had almost certainly been used before for human cargo," including possibly for an Egyptian military official who had defected to Italy several years before but then disappeared without a trace before reappearing under Egyptian custody and facing trial.
(Source: https://en.wikipedia.org/wiki/Diplomatic_bag)
Others have mentioned Jamal Khashoggi.