PH Page 190 has a section on different speeds that I think would apply:
If you have more than one speed…you can switch back and forth between your speeds during your move. Whenever you switch, subtract the distance you've already moved from the new speed. The result determines how much farther you can move. If the result is 0 ar less, you can't use the new speed during the current move.
Your Questions
If a creature with normal speed 30 entered the area after moving 15 feet, what is its remaining available movement?
You have a speed of 30 and move 15 feet. You then enter the area and you now have a move of 15 feet. Your already-traveled movement is subtracted from your move speed, which is 0 or less, so you can't use the "new" speed.
If a creature with normal speed 30/halved speed 15 starts in the area and moves 15 feet to exit the area, what is its remaining movement?
This is the opposite, you have a speed of 15, and move 15 feet and are out of the area. Your speed is now 30, and you've only used 15 feet, so have 15 more feet available.
Difficult Terrain
The section you are referring to is under the Speed heading, which states that "[t]he following rules determine how far a character or monster can move in a minute, an hour, or a day." Therefore, those rules wouldn't apply to in-combat movement since that has its own rules.
The rules for in-combat difficult terrain are found PH page 190:
Every foot of movement in difficult terrain costs 1 extra foot. This rule is true even if multiple things in a space count as difficult terrain.
Nothing about halved movement. Hence, I conclude that halved movement, at least in combat (since the spell in question has a duration of 10min, I don't see it being that useful outside of combat), means \$ \frac{speed}{2}\$.
Since you move the spell effect there is no reason why you cannot choose its path
There is no general rule that covers all spells whose AOE you can move. However, the two examples you specifically ask about can be addressed here sufficiently.
The description of the healing spirit spell (XGtE, p. 157) says:
you can move the spirit up to 30 feet to a space you can see.
This effect is very clear, you can move the effect 30 feet. It does not have to be in a straight line so, you can take any path you want.
The description of the moonbeam spell says:
you can [...] move the beam 60 feet in any direction
This one is perhaps a bit less clear, but a plain English reading would suggest that there is nothing restricting the movement path really. It doesn't say "any one direction" just "any direction".
This intent is confirmed in an unofficial tweet by rules designer Jeremy Crawford:
5e question: Moonbeam can be moved UP TO 60 ft. or EXACTLY 60 ft.? Other spells specify UP TO, Moonbeam doesn't
The intent is that you can move moonbeam's light up to 60 feet.
So again, you have complete control of the spell effect's path.
However, do note that this can be different depending on the wording of each spell. Some might restrict the path that can be moved even if these two don't. There is no general rule that covers all spells whose AOE you can move.
Moving an AOE that requires entering over a creature does not cause them to be affected by it
The Sage Advice Compendium has some explanation about AOE spells like moonbeam and how they affect enemies:
Our design intent for such spells is this: a creature enters the area of effect when the creature passes into it. Creating the area of effect on the creature or moving it onto the creature doesn't count. If the creature is still in the area at the start of its turn, it is subjected to the area’s effect.
And, stated another way by Jeremy Crawford on Twitter:
Movement of Moonbeam not count as creatures entering when spirit guardians moving into creature counts as entering?
Moonbeam, spirit guardians & the like work the same way: a creature, not the spell effect, does the entering.
So, no, no matter how you move the spells you cannot affect more creatures.
Best Answer
No. This official ruling from the April 2016 edition of the Sage Advice column answers why:
The healing spirit spell requires the creature to move into it or start a turn there; moving the spell onto a creature or casting it on a creature's space has no effect.
Yes. The spell simply requires that you enter the space at some point during your turn (or begin a turn there). There is no requirement to stay in it, so passing through it qualifies.
According to the errata released in 2020, no:
Healing spirit was heavily nerfed, and your proposed method no longer works.