Yes you can bake cake or anything else in a Pyrex glass bowl and it will be just fine.
Pyrex bowls and other Pyrex dishes are oven safe and can withstand the heat of an oven and they work great for baking cakes in.
I use my Pyrex bowls to bake cake in a lot and I've never had one shatter by doing so and the cake turns out just as great as it would in a regular cake baking dish.
Just don't put the Pyrex dish or Pyrex bowl directly onto a stove top burner because it can shatter because of the direct heating of it.
But when placed in the oven it's very safe and can take the heat from the oven.