I think I have never actually read wall of fire’s details. I am shocked at how poor a spell it is—and how poorly-written are its rules.
First of all, covering the clear bit:
An immobile, blazing curtain of shimmering violet fire springs into existence. One side of the wall, selected by you, sends forth waves of heat, dealing 2d4 points of fire damage to creatures within 10 feet and 1d4 points of fire damage to those past 10 feet but within 20 feet. The wall deals this damage when it appears and on your turn each round to all creatures in the area. In addition, the wall deals 2d6 points of fire damage +1 point of fire damage per caster level (maximum +20) to any creature passing through it. The wall deals double damage to undead creatures.
Ignoring the rest of the spell for the moment, according to this, no. There is no square that takes the full 2d6+level damage, so you cannot keep a creature in that location.
Wall of fire, like all “wall” spells, is drawn along an edge on the grid, and then on one side of that edge, there are two squares of 2d4 fire damage and then another two squares of 1d4 damage. The 2d6+level damage only occurs if a creature “passes through” the edge itself, that is, crosses from a square on one side of it to the square on the other side of it.
Creatures cannot stop, or be stopped, on the edge of a square under the rules. All creatures are considered to be aligned with the grid.
Now for the part that isn’t clear:
If you evoke the wall so that it appears where creatures are, each creature takes damage as if passing through the wall.
As just established, this is basically saying “if you do this thing that you cannot do,” then you get the full damage. That is kind of nonsense.
Then again, so is the idea that you cannot hold a creature in the edge itself. So is the idea that both the spell and the creatures are always completely aligned to the grid. This line seems to be implicitly acknowledging that (if “implicit acknowledgement” isn’t already an oxymoron)—but unfortunately, even if we accept that, it’s still unclear.
The clause stating that “each creature takes damage as if passing through the wall” is ambiguous as to whether or not that damage-taking is a one-time thing, or an ongoing thing until they move. The simple present tense as seen here can be used for either in the English language. On top of that, even if we take this clause as acknowledging the possibility of the wall of fire crossing right through a creature (either creature or wall not perfectly aligned to the grid), the first paragraph of wall of fire’s rules, which definitely does establish an ongoing form of damage, uses “passing through” for the 2d6+level damage—it suggests that movement is necessary to trigger that, you cannot simply hold someone there to have that happen.
Recommendation: Assume the rules are written for someone trying to avoid damage
It seems to me that the rules were written assuming that creatures would be actively trying to avoid as much damage as they can when dealing with wall of fire, because that makes sense. The reason we have a breakdown here is because this dwarf 1. doesn’t care about the damage he himself might take, and 2. is in control of another creature’s positioning, able to force that creature into damaging positions against its will. The rules for wall of fire seem to have been written without considering either of those as a possibility.
So I suggest ignoring the rules’ technicalities here, and assume that when this dwarf pins a creature, it has “won the grapple” sufficiently to also have the creature in edge of the fire. Or if the dwarf already has the creature pinned, and wall of fire is cast on top of them. In both cases, they are standing in the “edge” of the fire and, I suggest, taking 2d6+level fire damage per round (at the start of the caster’s turn each round).
This is kind of moot anyway: there is a better option
Someone who wins a grapple can move, bringing everyone else in the grapple along with them, up to half their speed. For a typical dwarf with 25-ft. movement speed, that’s 10 feet—enough to move to the other side of the wall of fire, “passing through” for 2d6+level damage, and then back, “passing through” again for 2d6+level damage again. Grappling is honestly kind of unclear about it, but that is presumably a move action, which means the dwarf can then do it again—and thus pass through twice more. Up to 8d6+4×level damage! Plus, presumably, the 2d4 damage from being on that side of the wall at the start of the caster’s turn.
The 4×level is roughly equivalent to 1d6 per level (average 3½×level), so this damage is 8d6+2d4 (average 33) damage greater than your typical blasting spell, and it happens for several rounds on one spell slot. That makes it pretty good—as long as you can win all those grapple checks. Grappling is really hard, though, so that is far from guaranteed—and Gargantuan and larger creatures simply cannot be grappled by a dwarf unless other size-increasing magic is also coming into play. And even if you are succeeding at grapples, if you are moving that much, you aren’t pinning—and it kind of sucks to be winning at grapples but not pinning. If you pin every round, you give up half the damage—which means blasting spells of caster level 5th or higher are going to tend to do more damage than wall of fire will. That’s because wall of fire is a really weak spell, and it takes this kind of abuse to bring it in line with others.
Of course, a typical dungeoncrasher or übercharger at 7th level is dealing more damage with each attack, and using no spell slots, but hopefully this is but one trick up the sleeve of a runesmith.