Heavy Duty Floating Shelves for Kitchen
My take is that the sheer thickness of the shelves that you propose will look heavy and chunky to the point of being unattractive.

I would also have concerns about the overall sturdiness of a shelf that is cantilevered off a single 2x4 screwed to the wall. If it were me I would go for a thinner style of assembly and use vertical end sides on the shelves.