Im 36+4 and walk every day and do the elliptical. I'm still good. Wasn't active at all the first two trimester. My back hurts but I use belly support but that's it. I think you should try it if you feel good. Don't push your self tho. Just know your limit. 5K is not that much.
With my son I was able to do 6 miles at a slow but steady pace with my cousin. We normally were just talking so much we didnt realize how far we had walked. I would love to be able to do it again but I probably dont have enough time.
It's 3.5 miles, so you night not finish
You could always get a walking buddy abd walk it. They have medical professionals on site at every event like that so even if something happens or you go into labor there are people that can help. Consider your energy level as it gets closer and decide later. That way you are more certain you'll be able to complete the walk.