Is there any significance to the two coins under the first bridge in Super Mario 64?

Those coins, along with all the other coins you can find in the castle, have no significance, and you do not get a star for collecting them.

I believe at some point in development, there would have been a Star for gathering all 100 coins in the castle itself, but it was dummied out.

To get the coins anyway, see the spoiler below.

You need to get all 120 stars and then blast your way to the roof with the cannon. Up there, you will find Yoshi, as well as several Wing Cap blocks that you can use to fly around the castle area and gather the coins under the bridge.