You'll need to start over, sanding out the splotches of glue. To deal with the divots of glue, they can be 'set' using a nail-set in the same manner that you'd set a nail ... or the divots of glue can be dug/scraped out ... or simply left as-is.
You'll likely have similar splotches with store bought wood filler, and blotches can arise from other contaminants as well. One option is to re-sand, removing the existing splotches of glue, then apply a coat or two of the poly. This will seal the wood, then set/refill the divots if/as desired. As an alternative treatment, the divots can be blended in with a faux-finish by using a small artist's brush and a few tubes of artist's paints. Then apply your final coat(s).
Sorry for the bad news. Glues and fillers are a bane to fine woodworking. Take a week or two for a breather and regain your motivation to do a good job.
If you're staring with raw planks... PLEASE apply the same finish to all surfaces (underside as well as topside). Otherwise, the surface with the lesser finish will tend to absorb/lose moisture much more quickly than the surface with the heavier finish, and the planks will "cup", "bow", and warp with seasonal humidity changes.
Better than starting with raw planks would be starting with tongue-and-groove planks. The tongue/groove joints helps lock each pair of adjacent planks together so they commonly bear the weight of people & furniture. The T&G joint also helps prevent dirt from dropping down between dried/shrunken planks, preventing the joints from closing again in humid weather & causing buckling of the floor. Last, it helps stop breezes from blowing up through the floor from the space below.
It's possible to install the new flooring as a "floating" (not nailed down) floor over foam insulation (mostly for thermal insulation, but there IS a little sound insulation value)... but that's a whole different type of floor and really begs for a completely different approach. If you try to install any resilient insulation under nailed planks, you'll just get "nail pop", where the nails pop up through the surface of the floor and trip you, possibly tearing bare feet. There are completely different materials available (google "pergo") for floating-floor applications.
If it were my floor... I'd leave all the original floor planks in place regardless of condition, and cover them with all new flooring, diagonal or perpendicular to the original planks' direction.
EDIT: ALWAYS allow new flooring to "season" in its destination room for several weeks prior to installation so it's in humidity equilibrium with the room, preferentially always install during the period of highest humidity and make all joints TIGHT, and ALWAYS leave at least 3/4" (18mm) gap around all edges. You'll probably need to remove any existing mopboards/baseboards & trim before flooring, then cover the gap with them after flooring.
Best Answer
If you are going to replace the molding, I would replace the jam as well. I looks to me like you are due for an upgrade in all of your wood-work. With the new floors and new wood-work, I think you would see a marked improvement in the overall look of he space.