It's pretty easy to model a damage-dealing challenge. On some level, that's what almost any trap is. Consider the classic "Hallway full of darts" - it makes an attack against each player after they act for some amount of damage and players try to dodge through, spot pressure plates or disarm the mechanism. Right off the bat this is something that's pretty easy to model as a combat challenge, with the player's able to inflict damage by trying to circumvent (dodge), Understand (find patterns, stay off pressure plates) or manipulate (disarm). Smashing is probably off the table since hitting the walls with a sword doesn't help much, but that's fine. Player might be able to use acrobatics or athletics to dodge, perception, dungeoneering or maybe even stealth to try to avoid triggering it, or dungeoneering to try to disarm it.
The DM sets the difficulty of these things by setting the defenses, which helps dictate the shape of the challenge. In many challenges, one path might be easier than others (so it may have a weak defense). Alternately, a challenge may have one best solution and many ok solutions, in which case the approach that supports the most skills will have the highest defense, while the specialized defense may be lower. In the case of the dart trap, Understanding supports lots of skills, so that might mean a high will defense, but only one skill is useful for manipulating, so the fort defense might be the low one.(It's also entirely reasonable for the DM to give the challenge vulnerability to certain approaches. Vulnerability 10 (Disarm) might be a little awkward on the page, but the idea is pretty workable).
All very easy, but it gets more complicated when we get out into the realm of other challenges, ones with consequences that are less easily measured in hit points. This is where the GM really needs to put some thought into things because this is probably the single most important part of designing a good challenge, though this may not be immediately be obvious.
What the GM needs to decide is what this challenge threatens and determine how to measure that. The easiest way to do this is to express this in terms of some kind of currency. Just as Hit Points are a currency for the health and well being of the characters, there may be other currencies to reflect other important things.
There are a few existing currencies within 4e beyond hit points. Treasure (both gold and magic) and XP are both good examples. I'd be very hesitant to threaten a character's XP with a challenge, but it might be reasonable to threaten money, such as with a challenge that imposes repair bills. Dark Sun also introduced the idea of "Provisions" as currency, and that makes for a GREAT currency for outdoor challenges over time.
However, there will not always be some existing currency for you to use, in which case the GM's going to have to think of something to use that reflects the situation. This could be something concrete in the situation (like, each round, one of the seven sentinels falls) or it may be an arbitrary pool of points (the resolve of the citizenry has 100 points, but the propaganda of the cultists is doing damage to it every round).
As a math or game exercise, this is easy enough to do, but the trick is to make sure the currency is something more than an abstract exercise. The first trick of this is to realize that there are two main ways to handle currency and you don't want to mix them. The first kind has intrinsic value, like gold. Every time it's diminished, the owner loses out on something, and a near win is still going to be very costly. The second kind works as ablative protection for something else, like Hit Points do with health. The actual loss of the currency doesn't cost much of anything, but if the currency is completely expended, then something very terrible happens.
Intrinsic currency is usually less valuable in total than ablative currency - that is to say, losing all your money may stink, but not as much as a sucking chest wound. That's important for GMs to bear in mind when deciding how to structure the currency for a challenge. Intrinsic currency is useful when a challenge is supposed to be inconvenient and to burn through resources. Ablative currency is better for the all or nothing.
There's a temptation to mix the two with a sense that doing so increases the stakes, and thus the excitement and tension of the challenge. COnsider launching attacks against the PC's troops. If damage removes troops, that's intrinsic (because it diminishes the resource) but it also feels like an ablative challenge because if they lose, all the troops are lost. That's dangerous and tricky, since it is more likely to increase frustration - for players it can feel like they're in a lose-lose situation. The currency loss hurts badly enough that the whole exercise feels pointless.
Sometimes that's desirable, such as to underscore a very bleak situation, but that should be _rare_.
One alternative to consider in all this is to give the PCs SP's, just as they have HP. That's actually a very workable model, and if you can get the table to accept the idea that these all work as measures of how long the player can stay functional rather than concrete measures of health then you're ready to rock. That is a little bit of a weird idea, though, so I'm not counting on it.
Anyway, the question of how the challenge hurts you back is only one issue on the table. Tomorrow, we need to figure out when and where it gets a chance to do so.
1 - When building a challenge, the question to ask is whether you're trying to engage the group equally or if you're looking to give one player a chance to showcase his particular strengths (like the classic thief disarming a trap or wizard deciphering arcane runes). That can give you
2 - You can even keep them the same as HP. Yes, there's a temptation to switch stat from situation to situation, but that invites bookkeeping pain. Instead, I would suggest that endurance is the one truly unifying element required for all human endeavors. It's physical necessity is obvious, and for mental exertion I would suggest that while wisdom is all about that burst of will and focus that lets you shrug off a mental assault, constitution is still what you lean on to decide not to have that cigarette. (Yes, this is a rationalization of a mechanic. I'm ok with that).