That piece of 2x4 is considered a "compressible shim", and it can be a potential problem, especially if it's laid flat (compressive strength in dimensional lumber is different depending on grain orientation). The IRC doesn't address compressible shims specifically, but it also doesn't address how plumb a wall or how level a floor should be.
Picture yourself 10 years down the road and that shim is compressing, and your drywall is cracking in the rooms above. Is settlement normal? Sure. Should you have to put up with it? No. Can it be minimized? Yes, and one way is by using non-compressible shims. Look at the plans for any commercial building, and you will find a spec that states only non-compressible shims will be used.
Also, there is only one known manufacturer of tele-posts in North America that has a code-compliant adjustable post. If it doesn't carry a label with the load capacity and what code it satisfies, it's a non-prescriptive element.
When inspecting homes for structural problems, I will always call out wood shims and adjustable posts as areas of concern.