Once you bake a cake and allow it to cool down the cake will not bake anymore if you let it cool down.
So if you've baked the cake and it doesn't seem done enough then you must bake it again while it's still hot otherwise all you'll do is heat the cake back up.
So you can place the cake back into the oven after it cools but the only thing it will do is heat the cake back up but not cook it anymore.
There's nothing wrong with eating cake that isn't all the way done and I've eaten cake before that hasn't been baked all the way.
It was a cake that fell apart easily while eaten but it was okay and safe to eat.
Depending on the size of the cake it usually takes 15 to 30 minutes to bake fully but some larger cakes may need as long as 40 minutes of baking before it's done.
You can use a toothpick in the center of the cake to check to see if it is done and if the toothpick comes out clean the cake should be done and ready to eat.
Also make sure the cake has cooled down before applying the icing otherwise the icing could melt off the cake.