It doesn't have to be complicated.
More than three levels below, you receive 0 stat benefit from the item.
3 levels below: 25% stat benefit.
2 levels below: 50% stat benefit.
1 level below: 75% stat benefit.
At level and above: 100% stat benefit.
If an item doesn't favor your class, there's an additional 25% penalty added on top of the above. I can't imagine this would be that hard to implement, and it shouldn't mess up balance. If the itemization is done right, At three levels below you're better off wearing another item, while at one level below the new item is better.