The Player's Handbook II, as well as the Rules Compendium, create and make a number of changes to the spells of the polymorph subschool - including adding alter self to the polymorph subschool - as well as clarifying that spells of the polymorph subschool, among other effects, now "[...] treat [... the target as] having its normal Hit Dice for purpose of adjudicating effects based on HD." (Player's Handbook II p. 95; Rules Compendium p. 122)
Thus, alter self, as well as the rest of the polymorph subschool, are explicit with regard to the HD of affected subjects: the subject(s) retain the HD of their original form(s).
(This rules alteration is consistent with the Player's Handbook errata that baleful polymorph received in February of 2006, as well as consistent with the change of the druid's Wild Shape class feature from being based on polymorph and instead based on Alternate Form. The Monster Manual received errata at the same time to clarify that Alternate Form would also grant the Hit Die of the original form.)
But, Maybe It Did
As well noted on this site in a handful of excellent questions and answers, and often by the community at large, neither the Player's Handbook II nor Rules Compendium can actually alter the rules contained within the core rulebooks, which are the primary sources for special abilities and spells (among many other topics).
Indeed, one of the more counterintuitive (counter-logical?), and yet still rules-correct, positions a DM or rules lawyer can take is that the only way to change the core rules is with errata - swift actions, among other things, be damned.
But, even without taking the position that the Rules Compendium or Player's Handbook II are moot to the core rules - there also existed a period of time in which all players and DMs had for clarifying these core rules were the errata or the FAQ. (The last errata for the MM and PHB coming out in Feb. of 2006, and PHB2 releasing in May of 2006.)
And with the errata available for the core rules, of which all touch on this topic at least slightly, the question "does alter self affect HD," doesn't (or, rather, didn't) have as clear an answer, nor was the obfuscated answer the same as what it is now.
At the same time that Wizards of the Coast was clarifying what interaction baleful polymorph, Alternate Form, and Change Shape had with regard to the HD of the subject, and almost exactly two years after they'd made an errata to the polymorph description in the DMG (the relevant portion of the errata reading "[m]ost spells and abilities that grant the ability to polymorph place a cap on the Hit Dice of the form [...]"), the organization had still made no changes to alter self or, in fact, any of the other polymorph spells at all.
The errata that baleful polymorph did receive only helped to clarify the issue, though in the incorrect direction from where WotC ultimately ended up, as "[t]he target is treated as having its normal Hit Dice for purpose of adjudicating effects based on HD, such as the sleep spell [...]"
Baleful polymorph reading, in part, "[a]s polymorph, except [...]" and polymorph reading, in part, "[t]his spell functions like alter self, except [...]"
... Which, to a close reader of the rules and the available errata, would seem to clarify that alter self, polymorph, and others, in fact did limit the HD of the assumed forms -- not just during the selection process of casting the spell, but also afterward during the spell's effects.
It's A Confusing Issue
Alter self, polymorph et al., shapechange, alternate form, and change shape (among other spells) have been problematic for a long time. In 3rd edition's life cycle alone, these spells and abilities have been causing headaches since at least September of 2000.
I, personally, casually spent a not insignificant deal of time researching this issue since my last participation with this topic. (Attentive readers to this question will notice my commentary dissent with the accepted answer in July (!) of last year.)
While I am glad that the Rules Compendium and Player's Handbook II offer a clear ruling on the issue of alter self and HD, which would have probably saved some consternation and some unusual circumstances at the table ... it's also another example of the many "stealth" errata that the game designers thought the game required over the course of its lifespan.
Having played for years at a table where alter self, and spells based on alter self, affected the subject's HD, it didn't ruin the game for us by any means. In fact, it added some counterplay and "system mastery" (a concept that the game designers tried to reward without revealing how to master the system) to the game.
While the question "Does Alter Self limit my HD" might seems easily answered in the current view, this answer attempts to explain why some players, myself included, might have lingered on with the incorrect ruling that alter self behaves in a manner it does not now (and maybe really never did) behave.