None of this is defined at all
There’s just no rule for any of these things.¹
Whether temporary effects apply during level-up
Using temporary bonuses while leveling up is a theoretical-optimization mainstay, but that’s taking things from an extremely generous “all plausible rulings in our favor” point of view.
There is some basis for this. Very, very few things in the game care “how” you have the statistics that you do. There’s a few key things where the game tracks “base” stats—base attack bonus, base save bonus, and skill ranks—but those are the exceptions that prove the rule. We don’t have “base” Intelligence or “base” abilities—we just have whatever we have, however they got there. Or, at least, the rules lack any terminology for referring to such things.² That implies that any such distinctions are arbitrary, not a part of the rules.
But, of course, the DM is explicitly there as an arbitrator. It’s their job to make such distinctions in corner cases that the rules haven’t covered. The books make no claim to cover every eventuality. And it’s a real stretch to say that the lack-of-rule here is actually an endorsement.
Whether RHD or LA from temporary forms affects when you level-up
This has even less information on it. Alter self says
You acquire the physical qualities of the new form while retaining your own mind. Physical qualities include natural size, mundane movement capabilities […], natural armor bonus, natural weapons […], racial skill bonuses, racial bonus feats, and any gross physical qualities […].
Is LA any of these things? Probably not, but it’s hard to say for sure. What about RHD? Those are... more physical, but are they the same as these?
Likewise, about things you don’t get, we have
You do not gain any extraordinary special attacks or special qualities not noted above under physical qualities, such as darkvision, low-light vision, blindsense, blindsight, fast healing, regeneration, scent, and so forth.
You do not gain any supernatural special attacks, special qualities, or spell-like abilities of the new form. Your creature type and subtype (if any) remain the same regardless of your new form. You cannot take the form of any creature with a template, even if that template doesn’t change the creature type or subtype.
Now does any of this cover LA or RHD? It’d be real, real hard to claim they’re extraordinary abilities. They certainly aren’t listed under special attacks or special qualities in monsters’ statblocks. They are their own thing—which is not mentioned under things you do gain or under things you don’t gain. I suppose we should default to you not getting them, except...
You assume the form of a creature of the same type as your normal form. The new form must be within one size category of your normal size. The maximum HD of an assumed form is equal to your caster level, to a maximum of 5 HD at 5th level.
This kinda makes it sound like you do get the RHD, at least, as part of the “form.” Though of course it’s entirely possible that this is being used purely as a gate-keeping device on when you can assume certain forms and is unrelated to what actually happens when you do. LA is still AWOL.
And then even if you get them, do they count? Your guess is as good as mine. Again, optimizers tend to assume “No,” and there is some basis for it: NPCs don’t have their abilities count against them in this manner, so why should PCs?
Do not award XP for creatures that enemies summon or otherwise add to their forces with magic powers. An enemy’s ability to summon or add these creatures is part of the enemy’s CR already. (You don’t give PCs more XP if a drow cleric casts unholy blight on them, so don’t give them more XP if she casts summon monster IV instead.)
(Dungeon Master’s Guide pg. 37)
This addresses summoning, but shapechanging is the same kind of idea. In theory, the ability to take on that form is balanced by various factors and appropriate to the PC’s actual level, so using those abilities shouldn’t make them earn less XP. That’s a wonderful theory, but well, we know the game isn’t remotely balanced.
Still, personally anyway, I despise anything that makes me calculate separate XP awards for individual PCs. I eliminate all of them from my games, and recommend everyone else do the same. No split levels, no XP costs, no LA, nada. Everyone stays at the exact same HD, ECL, and XP value. This is obviously not where the rules are, but in this one regard—that shapechanging magic shouldn’t be altering ECL on the fly—I’ll accept their lack-of-rule as being in the right place.
Well, technically, there is one rule relevant to the points you raised in the question: alter self explicitly states that “A body with extra limbs does not allow you to make more attacks (or more advantageous two-weapon attacks) than normal,” so using it to become a thri-kreen doesn’t offer the “four clawed arms” you mention in the question. That’s rather tangential though.
Perhaps tellingly, Paizo’s Pathfinder spin-off went out of its way to define “temporary” and “permanent” bonuses to things, to try to clarify some of this. That they felt the need to do that suggests that in 3.5e, there wasn’t any such distinction. But they could have had other reasons for doing so.